public static function execute($action, $method, $vars, &$context)
    {
        $controller = trim(dirname($action), './');
        $action = basename($action);
        if (empty($controller)) {
            $controller = $action;
            $action = self::$config['default_action'];
        }

        $className = trim(self::$config['namespace'] . '\\' 
                   . str_replace(' ', '\\', ucwords(str_replace('/', ' ', $controller))) 
                   . 'Controller', '\\');
        
        Atomik::fireEvent('Controller::Execute', array(&$className));

        if (!class_exists($className)) {
            throw new AtomikHttpException("Class '$className' not found", 404);
        } else if (!is_subclass_of($className, 'Atomik\Controller\Controller')) {
            throw new AtomikException("Class '$className' must subclass 'Atomik\Controller\Controller'");
        }
        
        $instance = new $className();
        if (($vars = $instance->_dispatch($action, $method, $vars)) === false) {
            return false;
        }
        
        if (!is_array($vars)) {
            $vars = array();
        }
        return array_merge(get_object_vars($instance), $vars);
    }
public static function execute($action, $method, $vars, &$context)
    {
        $controller = trim(dirname($action), './');
        $action = basename($action);
        if (empty($controller)) {
            $controller = $action;
            $action = self::$config['default_action'];
        }

        $className = trim(self::$config['namespace'] . '\\' 
                   . str_replace(' ', '\\', ucwords(str_replace('/', ' ', $controller))) 
                   . 'Controller', '\\');
        
        Atomik::fireEvent('Controller::Execute', array(&$className));

        if (!class_exists($className)) {
            throw new AtomikHttpException("Class '$className' not found", 404);
        } else if (!is_subclass_of($className, 'Atomik\Controller\Controller')) {
            throw new AtomikException("Class '$className' must subclass 'Atomik\Controller\Controller'");
        }
        
        $instance = new $className();
        if (($vars = $instance->_dispatch($action, $method, $vars)) === false) {
            return false;
        }
        
        if (!is_array($vars)) {
            $vars = array();
        }
        return array_merge(get_object_vars($instance), $vars);
    }
public static function execute ( $ action , $ method , $ vars , & $ context ) { $ controller = trim ( dirname ( $ action ) , './' ) ; $ action = basename ( $ action ) ; if ( empty ( $ controller ) ) { $ controller = $ action ; $ action = self :: $ config [ 'default_action' ] ; } $ className = trim ( self :: $ config [ 'namespace' ] . '\\' . str_replace ( ' ' , '\\' , ucwords ( str_replace ( '/' , ' ' , $ controller ) ) ) . 'Controller' , '\\' ) ; Atomik :: fireEvent ( 'Controller::Execute' , array ( & $ className ) ) ; if ( ! class_exists ( $ className ) ) { throw new AtomikHttpException ( "Class '$className' not found" , 404 ) ; } else if ( ! is_subclass_of ( $ className , 'Atomik\Controller\Controller' ) ) { throw new AtomikException ( "Class '$className' must subclass 'Atomik\Controller\Controller'" ) ; } $ instance = new $ className ( ) ; if ( ( $ vars = $ instance -> _dispatch ( $ action , $ method , $ vars ) ) === false ) { return false ; } if ( ! is_array ( $ vars ) ) { $ vars = array ( ) ; } return array_merge ( get_object_vars ( $ instance ) , $ vars ) ; }
Executor which defines controllers and actions MVC-style

@param string $action
@param string $method
@param array  $context
@return array
Executor which defines controllers and actions MVC - style