PHP 클래스 Robo\Robo

파일 보기 프로젝트 열기: codegyre/robo 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$container League\Container\ContainerInterface | null The currently active container object, or NULL if not initialized yet.

공개 메소드들

메소드 설명
addInflectors ( League\Container\ContainerInterface $container ) Add the Robo League\Container inflectors to the container
application ( ) : Robo\Application
config ( ) : Robo\Config
configureContainer ( League\Container\ContainerInterface $container, Application $app, robo\Config $config, null | Symfony\Component\Console\Input\InputInterface $input = null, null | Symfony\Component\Console\Output\OutputInterface $output = null ) Initialize a container with all of the default Robo services.
createDefaultApplication ( null | string $appName = null, null | string $appVersion = null ) : Robo\Application
createDefaultContainer ( null | Symfony\Component\Console\Input\InputInterface $input = null, null | Symfony\Component\Console\Output\OutputInterface $output = null, null | Robo\Application $app = null, null | Robo\Config $config = null ) : League\Container\Container | League\Container\ContainerInterface Create a container and initiailze it. If you wish to *change* anything defined in the container, then you should call \Robo::configureContainer() instead of this function.
getContainer ( ) : League\Container\ContainerInterface Returns the currently active global container.
hasContainer ( ) : boolean Returns TRUE if the container has been initialized, FALSE otherwise.
hasService ( string $id ) : boolean Indicates if a service is defined in the container.
input ( ) : Symfony\Component\Console\Input\InputInterface Return the input object.
logger ( ) : Consolidation\Log\Logger
output ( ) : Symfony\Component\Console\Output\OutputInterface Return the output object.
resultPrinter ( ) : Robo\Log\ResultPrinter Return the result printer object.
run ( string[] $argv, string $commandClasses, null | string $appName = null, null | string $appVersion = null, null | Symfony\Component\Console\Output\OutputInterface $output = null ) : integer Entrypoint for standalone Robo-based tools. See docs/framework.md.
service ( string $id ) : mixed Retrieves a service from the container.
setContainer ( League\Container\ContainerInterface $container ) Sets a new global container.
unsetContainer ( ) Unsets the global container.

메소드 상세

addInflectors() 공개 정적인 메소드

Add the Robo League\Container inflectors to the container
public static addInflectors ( League\Container\ContainerInterface $container )
$container League\Container\ContainerInterface

application() 공개 정적인 메소드

public static application ( ) : Robo\Application
리턴 Robo\Application

config() 공개 정적인 메소드

public static config ( ) : Robo\Config
리턴 Robo\Config

configureContainer() 공개 정적인 메소드

IMPORTANT: after calling this method, clients MUST call: $dispatcher = $container->get('eventDispatcher'); $app->setDispatcher($dispatcher); Any modification to the container should be done prior to fetching objects from it. It is recommended to use \Robo::createDefaultContainer() instead, which does all required setup for the caller, but has the limitation that the container it creates can only be extended, not modified.
public static configureContainer ( League\Container\ContainerInterface $container, Application $app, robo\Config $config, null | Symfony\Component\Console\Input\InputInterface $input = null, null | Symfony\Component\Console\Output\OutputInterface $output = null )
$container League\Container\ContainerInterface
$app Symfony\Component\Console\Application
$config robo\Config
$input null | Symfony\Component\Console\Input\InputInterface
$output null | Symfony\Component\Console\Output\OutputInterface

createDefaultApplication() 공개 정적인 메소드

public static createDefaultApplication ( null | string $appName = null, null | string $appVersion = null ) : Robo\Application
$appName null | string
$appVersion null | string
리턴 Robo\Application

createDefaultContainer() 공개 정적인 메소드

Create a container and initiailze it. If you wish to *change* anything defined in the container, then you should call \Robo::configureContainer() instead of this function.
public static createDefaultContainer ( null | Symfony\Component\Console\Input\InputInterface $input = null, null | Symfony\Component\Console\Output\OutputInterface $output = null, null | Robo\Application $app = null, null | Robo\Config $config = null ) : League\Container\Container | League\Container\ContainerInterface
$input null | Symfony\Component\Console\Input\InputInterface
$output null | Symfony\Component\Console\Output\OutputInterface
$app null | Robo\Application
$config null | Robo\Config
리턴 League\Container\Container | League\Container\ContainerInterface

getContainer() 공개 정적인 메소드

Returns the currently active global container.
public static getContainer ( ) : League\Container\ContainerInterface
리턴 League\Container\ContainerInterface

hasContainer() 공개 정적인 메소드

Returns TRUE if the container has been initialized, FALSE otherwise.
public static hasContainer ( ) : boolean
리턴 boolean

hasService() 공개 정적인 메소드

Indicates if a service is defined in the container.
public static hasService ( string $id ) : boolean
$id string The ID of the service to check.
리턴 boolean TRUE if the specified service exists, FALSE otherwise.

input() 공개 정적인 메소드

Return the input object.
public static input ( ) : Symfony\Component\Console\Input\InputInterface
리턴 Symfony\Component\Console\Input\InputInterface

logger() 공개 정적인 메소드

public static logger ( ) : Consolidation\Log\Logger
리턴 Consolidation\Log\Logger

output() 공개 정적인 메소드

Return the output object.
public static output ( ) : Symfony\Component\Console\Output\OutputInterface
리턴 Symfony\Component\Console\Output\OutputInterface

resultPrinter() 공개 정적인 메소드

Return the result printer object.
public static resultPrinter ( ) : Robo\Log\ResultPrinter
리턴 Robo\Log\ResultPrinter

run() 공개 정적인 메소드

Entrypoint for standalone Robo-based tools. See docs/framework.md.
public static run ( string[] $argv, string $commandClasses, null | string $appName = null, null | string $appVersion = null, null | Symfony\Component\Console\Output\OutputInterface $output = null ) : integer
$argv string[]
$commandClasses string
$appName null | string
$appVersion null | string
$output null | Symfony\Component\Console\Output\OutputInterface
리턴 integer

service() 공개 정적인 메소드

Use this method if the desired service is not one of those with a dedicated accessor method below. If it is listed below, those methods are preferred as they can return useful type hints.
public static service ( string $id ) : mixed
$id string The ID of the service to retrieve.
리턴 mixed The specified service.

setContainer() 공개 정적인 메소드

Sets a new global container.
public static setContainer ( League\Container\ContainerInterface $container )
$container League\Container\ContainerInterface A new container instance to replace the current.

unsetContainer() 공개 정적인 메소드

Unsets the global container.
public static unsetContainer ( )

프로퍼티 상세

$container 보호되어 있는 정적으로 프로퍼티

The currently active container object, or NULL if not initialized yet.
protected static ContainerInterface,League\Container|null $container
리턴 League\Container\ContainerInterface | null