PHP Класс Cilex\Application

Автор: Mike van Riel ([email protected])
Наследование: extends Pimple\Container
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( string $name, string | null $version = null, array $values = [] ) Registers the autoloader and necessary components.
boot ( ) : void Boots the Application by calling boot on every provider added and then subscribe in order to add listeners.
command ( string | Command $nameOrCommand, callable | null $callable = null ) : Command Allows you to add a command as Command object or as a command name+callable
register ( Pimple\ServiceProviderInterface $provider, array $values = [] ) {@inheritDoc}
run ( Symfony\Component\Console\Input\InputInterface $input = null, Symfony\Component\Console\Output\OutputInterface $output = null ) : integer Executes this application.

Описание методов

__construct() публичный метод

Registers the autoloader and necessary components.
public __construct ( string $name, string | null $version = null, array $values = [] )
$name string Name for this application.
$version string | null Version number for this application.
$values array

boot() публичный метод

Boots the Application by calling boot on every provider added and then subscribe in order to add listeners.
public boot ( ) : void
Результат void

command() публичный метод

Allows you to add a command as Command object or as a command name+callable
public command ( string | Command $nameOrCommand, callable | null $callable = null ) : Command
$nameOrCommand string | Symfony\Component\Console\Command\Command
$callable callable | null Must be a callable if $nameOrCommand is the command's name
Результат Symfony\Component\Console\Command\Command The command instance that you can further configure

register() публичный метод

{@inheritDoc}
public register ( Pimple\ServiceProviderInterface $provider, array $values = [] )
$provider Pimple\ServiceProviderInterface
$values array

run() публичный метод

Executes this application.
public run ( Symfony\Component\Console\Input\InputInterface $input = null, Symfony\Component\Console\Output\OutputInterface $output = null ) : integer
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
Результат integer