public static function executeFile($action, $method, $vars, $context)
    {
        $methodAction = $action . '.' . $method;
        $actionFilename = self::actionFilename($action);
        $methodActionFilename = self::actionFilename($methodAction);
        
        self::fireEvent('Atomik::Executefile', array(&$actionFilename, &$methodActionFilename, &$context));
        if ($actionFilename === false && $methodActionFilename === false) {
            return false;
        }
        
        $atomik = self::instance();
        if ($actionFilename !== false) {
            list($content, $vars) = $atomik->scoped($actionFilename, $vars);
            echo $content;
        }
        if ($methodActionFilename !== false) {
            list($content, $vars) = $atomik->scoped($methodActionFilename, $vars);
            echo $content;
        }
        
        return $vars;
    }
public static function executeFile($action, $method, $vars, $context)
    {
        $methodAction = $action . '.' . $method;
        $actionFilename = self::actionFilename($action);
        $methodActionFilename = self::actionFilename($methodAction);
        
        self::fireEvent('Atomik::Executefile', array(&$actionFilename, &$methodActionFilename, &$context));
        if ($actionFilename === false && $methodActionFilename === false) {
            return false;
        }
        
        $atomik = self::instance();
        if ($actionFilename !== false) {
            list($content, $vars) = $atomik->scoped($actionFilename, $vars);
            echo $content;
        }
        if ($methodActionFilename !== false) {
            list($content, $vars) = $atomik->scoped($methodActionFilename, $vars);
            echo $content;
        }
        
        return $vars;
    }
public static function executeFile ( $ action , $ method , $ vars , $ context ) { $ methodAction = $ action . '.' . $ method ; $ actionFilename = self :: actionFilename ( $ action ) ; $ methodActionFilename = self :: actionFilename ( $ methodAction ) ; self :: fireEvent ( 'Atomik::Executefile' , array ( & $ actionFilename , & $ methodActionFilename , & $ context ) ) ; if ( $ actionFilename === false && $ methodActionFilename === false ) { return false ; } $ atomik = self :: instance ( ) ; if ( $ actionFilename !== false ) { list ( $ content , $ vars ) = $ atomik -> scoped ( $ actionFilename , $ vars ) ; echo $ content ; } if ( $ methodActionFilename !== false ) { list ( $ content , $ vars ) = $ atomik -> scoped ( $ methodActionFilename , $ vars ) ; echo $ content ; } return $ vars ; }
Executor which uses files to define actions

Searches for a file called after the action (with the php extension) inside
directories set under atomik/dirs/actions

The content of this file can be anything.

You can create an action file per http method by suffixing the action
name by the http method in lower case with a dot separating them.
(eg: submit action for POST => submit.post.php)
The non-http-method specific file (ie without any suffix) will always
be executed before the http-method specific file and variables will
be forwarded from one to another.

@internal
@param string $action
@param string $method
@param array  $context
@return array
Executor which uses files to define actions