\Vegas\CliLoader

Class Loader

Parses command line arguments passed to CLI application and loads indicated tasks

Summary

Methods
Properties
Constants
parseArguments()
No public properties found
SEPARATOR
APP_TASK_PREFIX
CORE_TASK_PREFIX
lookupTaskClass()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Constants

SEPARATOR

SEPARATOR

APP_TASK_PREFIX

APP_TASK_PREFIX

CORE_TASK_PREFIX

CORE_TASK_PREFIX

Methods

parseArguments()

parseArguments(\Vegas\Cli\Console $console,  $arguments) : array

Parses indicated arguments from command line Returns prepared array with task, action and additional arguments

Parameters

\Vegas\Cli\Console $console
$arguments

Throws

\Vegas\Cli\Exception\TaskActionNotSpecifiedException
\Vegas\Cli\Exception\TaskNotFoundException

Returns

array

lookupTaskClass()

lookupTaskClass( $arguments) : string

Resolves name of task class The task classes placed in the following location will be resolved * php cli.php app:example .

.. -> app/tasks/ExampleTask.php

 * php cli.php app:foo:example ...   ->  app/modules/Foo/tasks/ExampleTask.php
 * php cli.php vegas:cli:example ... -> (vendor path)/vegas-cmf/core/Cli/Task/ExampleTask.php

Parameters

$arguments

Throws

\Vegas\Cli\Exception\TaskNotFoundException

Returns

string