PHP Class KernelLoader

显示文件 Open project: forkcms/forkcms Class Usage Examples

Protected Properties

Property Type Description
$kernel Symfony\Component\HttpKernel\KernelInterface

Public Methods

Method Description
__construct ( Symfony\Component\HttpKernel\KernelInterface $kernel )
get ( string $reference ) : object Gets a service by id.
getContainer ( ) : Symfony\Component\DependencyInjection\ContainerInterface
getKernel ( ) : Kernel
has ( string $reference ) : boolean Returns true if the service id is defined.
passContainerToModels ( ) This is fairly dirty, but so is having static method classes for models.
setKernel ( Symfony\Component\HttpKernel\KernelInterface $kernel = null )

Method Details

__construct() public method

public __construct ( Symfony\Component\HttpKernel\KernelInterface $kernel )
$kernel Symfony\Component\HttpKernel\KernelInterface

get() public method

Gets a service by id.
public get ( string $reference ) : object
$reference string The service id
return object The service

getContainer() public method

public getContainer ( ) : Symfony\Component\DependencyInjection\ContainerInterface
return Symfony\Component\DependencyInjection\ContainerInterface

getKernel() public method

public getKernel ( ) : Kernel
return Kernel

has() public method

Returns true if the service id is defined.
public has ( string $reference ) : boolean
$reference string The service id
return boolean true if the service id is defined, false otherwise

passContainerToModels() public method

Consider this a temporary solution until we have genuine models available.

setKernel() public method

public setKernel ( Symfony\Component\HttpKernel\KernelInterface $kernel = null )
$kernel Symfony\Component\HttpKernel\KernelInterface

Property Details

$kernel protected_oe property

protected KernelInterface,Symfony\Component\HttpKernel $kernel
return Symfony\Component\HttpKernel\KernelInterface