public static function execute($callback, array &$params = array()) {
        if (is_callable($callback)) {
            return is_array($callback) ?
                self::invokeMethod($callback, $params) :
                self::callFunction($callback, $params);
        }
        else {
            throw new \Exception('Invalid callback specified.');
        }
    }
public static function execute($callback, array &$params = array()) {
        if (is_callable($callback)) {
            return is_array($callback) ?
                self::invokeMethod($callback, $params) :
                self::callFunction($callback, $params);
        }
        else {
            throw new \Exception('Invalid callback specified.');
        }
    }
public static function execute ( $ callback , array & $ params = array ( ) ) { if ( is_callable ( $ callback ) ) { return is_array ( $ callback ) ? self :: invokeMethod ( $ callback , $ params ) : self :: callFunction ( $ callback , $ params ) ; } else { throw new \ Exception ( 'Invalid callback specified.' ) ; } }
Executes a callback function.

@param callback $callback Callback function
@param array $params Function parameters
@return mixed Function results
@throws \Exception
Executes a callback function .