src/classes/CCStr.php
public static function capture( $callback, $params = array() )
	{
		if ( is_string( $callback ) )
		{
			return $callback;
		}

		if ( !is_closure( $callback ) )
		{
			return "";
		}

		if ( !is_array( $params ) ) 
		{
			$params = array( $params );
		}

		ob_start();
		$return = call_user_func_array( $callback,  $params );
		$buffer = ob_get_clean();

		if ( !is_null( $return ) )
		{
			return $return;
		}

		return $buffer;
	}
public static function capture( $callback, $params = array() )
	{
		if ( is_string( $callback ) )
		{
			return $callback;
		}

		if ( !is_closure( $callback ) )
		{
			return "";
		}

		if ( !is_array( $params ) ) 
		{
			$params = array( $params );
		}

		ob_start();
		$return = call_user_func_array( $callback,  $params );
		$buffer = ob_get_clean();

		if ( !is_null( $return ) )
		{
			return $return;
		}

		return $buffer;
	}
public static function capture ( $ callback , $ params = array ( ) ) { if ( is_string ( $ callback ) ) { return $ callback ; } if ( ! is_closure ( $ callback ) ) { return "" ; } if ( ! is_array ( $ params ) ) { $ params = array ( $ params ) ; } ob_start ( ) ; $ return = call_user_func_array ( $ callback , $ params ) ; $ buffer = ob_get_clean ( ) ; if ( ! is_null ( $ return ) ) { return $ return ; } return $ buffer ; }
Try to get a string from a callback reading the output buffer

@param mixed		$callback
@param array 		$params
@return string
Try to get a string from a callback reading the output buffer