PHP Class Cilex\Provider\Console\ContainerAwareApplication

Author: Beau Simensen ([email protected])
Inheritance: extends Symfony\Component\Console\Application
Show file Open project: cilex/cilex Class Usage Examples

Public Methods

Method Description
__construct ( string $name = 'UNKNOWN', string $version = 'UNKNOWN' ) Constructor
getContainer ( ) : Pimple\Container Get the Container.
getService ( string $name ) : mixed | null Returns a service contained in the application pimple or null if none is found with that name.
setContainer ( Pimple\Container $pimple ) : void Sets a pimple instance onto this application.

Method Details

__construct() public method

Constructor
public __construct ( string $name = 'UNKNOWN', string $version = 'UNKNOWN' )
$name string The name of the application
$version string The version of the application

getContainer() public method

Get the Container.
public getContainer ( ) : Pimple\Container
return Pimple\Container

getService() public method

This is a convenience method used to retrieve an element from the Application pimple without having to assign the results of the getContainer() method in every call.
See also: self::getContainer()
public getService ( string $name ) : mixed | null
$name string Name of the service.
return mixed | null

setContainer() public method

Sets a pimple instance onto this application.
public setContainer ( Pimple\Container $pimple ) : void
$pimple Pimple\Container
return void