protected function _execute($action, $params = array())
    {
        $methodName = lcfirst(str_replace(' ', '', ucwords(str_replace('_', ' ', $action))));
        $args = array();

        try {
            $method = new ReflectionMethod($this, $methodName);
            if (!$method->isPublic()) {
                return false;
            }
            
            // building method parameters using request params
            foreach ($method->getParameters() as $param) {
                if (array_key_exists($param->getName(), $params)) {
                    $args[] = $params[$param->getName()];
                } else if (!$param->isOptional()) {
                    throw new AtomikException("Missing parameter '" . $param->getName() . "' in '" .
                        get_class($this) . "::$methodName()'");
                } else {
                    $args[] = $param->getDefaultValue();
                }
            }
            
        } catch (ReflectionException $e) {
            // do not stop if __call() exist, so it allows us to trap method calls
            if (!method_exists($this, '__call')) {
                return false;
            }
        }
        
        $className = substr(get_class($this), 0, -10);
        $className = trim(substr($className, strlen(trim(Plugin::$config['namespace'], '\\'))), '\\');
        $view = trim(str_replace('\\', '/', strtolower($className)) . "/$action", '/');
        $this->_setView($view);

        return call_user_func_array(array($this, $methodName), $args);
    }
protected function _execute($action, $params = array())
    {
        $methodName = lcfirst(str_replace(' ', '', ucwords(str_replace('_', ' ', $action))));
        $args = array();

        try {
            $method = new ReflectionMethod($this, $methodName);
            if (!$method->isPublic()) {
                return false;
            }
            
            // building method parameters using request params
            foreach ($method->getParameters() as $param) {
                if (array_key_exists($param->getName(), $params)) {
                    $args[] = $params[$param->getName()];
                } else if (!$param->isOptional()) {
                    throw new AtomikException("Missing parameter '" . $param->getName() . "' in '" .
                        get_class($this) . "::$methodName()'");
                } else {
                    $args[] = $param->getDefaultValue();
                }
            }
            
        } catch (ReflectionException $e) {
            // do not stop if __call() exist, so it allows us to trap method calls
            if (!method_exists($this, '__call')) {
                return false;
            }
        }
        
        $className = substr(get_class($this), 0, -10);
        $className = trim(substr($className, strlen(trim(Plugin::$config['namespace'], '\\'))), '\\');
        $view = trim(str_replace('\\', '/', strtolower($className)) . "/$action", '/');
        $this->_setView($view);

        return call_user_func_array(array($this, $methodName), $args);
    }
protected function _execute ( $ action , $ params = array ( ) ) { $ methodName = lcfirst ( str_replace ( ' ' , '' , ucwords ( str_replace ( '_' , ' ' , $ action ) ) ) ) ; $ args = array ( ) ; try { $ method = new ReflectionMethod ( $ this , $ methodName ) ; if ( ! $ method -> isPublic ( ) ) { return false ; } // building method parameters using request params foreach ( $ method -> getParameters ( ) as $ param ) { if ( array_key_exists ( $ param -> getName ( ) , $ params ) ) { $ args [ ] = $ params [ $ param -> getName ( ) ] ; } else if ( ! $ param -> isOptional ( ) ) { throw new AtomikException ( "Missing parameter '" . $ param -> getName ( ) . "' in '" . get_class ( $ this ) . "::$methodName()'" ) ; } else { $ args [ ] = $ param -> getDefaultValue ( ) ; } } } catch ( ReflectionException $ e ) { // do not stop if __call() exist, so it allows us to trap method calls if ( ! method_exists ( $ this , '__call' ) ) { return false ; } } $ className = substr ( get_class ( $ this ) , 0 , - 10 ) ; $ className = trim ( substr ( $ className , strlen ( trim ( Plugin :: $ config [ 'namespace' ] , '\\' ) ) ) , '\\' ) ; $ view = trim ( str_replace ( '\\' , '/' , strtolower ( $ className ) ) . "/$action" , '/' ) ; $ this -> _setView ( $ view ) ; return call_user_func_array ( array ( $ this , $ methodName ) , $ args ) ; }
Forward the current action to another action from the same controller

@param string $action
@param array $params
Forward the current action to another action from the same controller