public function parseArguments(Console $console, $arguments)
    {
        $this->consoleApp = $console;
        if (count($arguments) == 1) {
            throw new TaskNotFoundException();
        }
        $taskName = $this->lookupTaskClass($arguments);

        //prepares an array containing arguments for CLI handler
        $parsedArguments = array(
            'task'  =>  $taskName,
            'action'    =>  isset($arguments[2]) ? $arguments[2] : false
        );
        //adds additional arguments
        $parsedArguments[] = count($arguments) > 3 ? array_slice($arguments, 3) : array();
        return $parsedArguments;
    }
public function parseArguments(Console $console, $arguments)
    {
        $this->consoleApp = $console;
        if (count($arguments) == 1) {
            throw new TaskNotFoundException();
        }
        $taskName = $this->lookupTaskClass($arguments);

        //prepares an array containing arguments for CLI handler
        $parsedArguments = array(
            'task'  =>  $taskName,
            'action'    =>  isset($arguments[2]) ? $arguments[2] : false
        );
        //adds additional arguments
        $parsedArguments[] = count($arguments) > 3 ? array_slice($arguments, 3) : array();
        return $parsedArguments;
    }
public function parseArguments ( Console $ console , $ arguments ) { $ this -> consoleApp = $ console ; if ( count ( $ arguments ) == 1 ) { throw new TaskNotFoundException ( ) ; } $ taskName = $ this -> lookupTaskClass ( $ arguments ) ; //prepares an array containing arguments for CLI handler $ parsedArguments = array ( 'task' => $ taskName , 'action' => isset ( $ arguments [ 2 ] ) ? $ arguments [ 2 ] : false ) ; //adds additional arguments $ parsedArguments [ ] = count ( $ arguments ) > 3 ? array_slice ( $ arguments , 3 ) : array ( ) ; return $ parsedArguments ; }
Parses indicated arguments from command line
Returns prepared array with task, action and additional arguments

@param Console $console
@param $arguments
@throws Exception\TaskActionNotSpecifiedException
@throws Exception\TaskNotFoundException
@return array
Parses indicated arguments from command line Returns prepared array with task action and additional arguments