src/bundles/UI/Form.php
public static function capture( $callback = null, $key = null, $attr = null ) 
	{	
		// we got some dynamics in the parameters here so in case
		// of this shift stuff
		if ( is_callable( $attr ) && !is_callable( $callback ) )
		{
			$new_attr = $key;
			$key = $callback;
			$callback = $attr;
			$attr = $new_attr;
		}

		$form = new static;

		if ( is_null( $callback ) )
		{
			throw new Exception( 'Cannot use capture without a callback or string given.' );
		}

		// fix no array given
		if ( !is_array( $attr ) )
		{
			$attr = array();
		} 

		return static::start( $key, $attr ).\CCStr::capture( $callback, array( $form ) ).static::end();
	}
public static function capture( $callback = null, $key = null, $attr = null ) 
	{	
		// we got some dynamics in the parameters here so in case
		// of this shift stuff
		if ( is_callable( $attr ) && !is_callable( $callback ) )
		{
			$new_attr = $key;
			$key = $callback;
			$callback = $attr;
			$attr = $new_attr;
		}

		$form = new static;

		if ( is_null( $callback ) )
		{
			throw new Exception( 'Cannot use capture without a callback or string given.' );
		}

		// fix no array given
		if ( !is_array( $attr ) )
		{
			$attr = array();
		} 

		return static::start( $key, $attr ).\CCStr::capture( $callback, array( $form ) ).static::end();
	}
public static function capture ( $ callback = null , $ key = null , $ attr = null ) { // we got some dynamics in the parameters here so in case // of this shift stuff if ( is_callable ( $ attr ) && ! is_callable ( $ callback ) ) { $ new_attr = $ key ; $ key = $ callback ; $ callback = $ attr ; $ attr = $ new_attr ; } $ form = new static ; if ( is_null ( $ callback ) ) { throw new Exception ( 'Cannot use capture without a callback or string given.' ) ; } // fix no array given if ( ! is_array ( $ attr ) ) { $ attr = array ( ) ; } return static :: start ( $ key , $ attr ) . \ CCStr :: capture ( $ callback , array ( $ form ) ) . static :: end ( ) ; }
Create a new from instance

@param callback		$callback
@param string			$key			The form key used for identification.
@param array 			$attr		The form dom attributes.
@return UI\Form
Create a new from instance