private function generate()
    {
        $action = $this->arg->getParameter('action');

        if (!in_array($action, ['key', 'resource', 'session'])) {
            $this->throwFailsAction('This action is not exists', 'help generate');
        }

        $this->command->call(
            'generate',
            $action,
            $this->arg->getParameter('target')
        );
    }
private function generate()
    {
        $action = $this->arg->getParameter('action');

        if (!in_array($action, ['key', 'resource', 'session'])) {
            $this->throwFailsAction('This action is not exists', 'help generate');
        }

        $this->command->call(
            'generate',
            $action,
            $this->arg->getParameter('target')
        );
    }
private function generate ( ) { $ action = $ this -> arg -> getParameter ( 'action' ) ; if ( ! in_array ( $ action , [ 'key' , 'resource' , 'session' ] ) ) { $ this -> throwFailsAction ( 'This action is not exists' , 'help generate' ) ; } $ this -> command -> call ( 'generate' , $ action , $ this -> arg -> getParameter ( 'target' ) ) ; }
Allows generate a resource on a controller

@return void
Allows generate a resource on a controller