eZPublishCommunityProject  2013.5
eZ\Publish\Core\MVC\Legacy\Kernel\CLIHandler Class Reference
+ Inheritance diagram for eZ\Publish\Core\MVC\Legacy\Kernel\CLIHandler:
+ Collaboration diagram for eZ\Publish\Core\MVC\Legacy\Kernel\CLIHandler:

Public Member Functions

 __construct (array $settings=array(), SiteAccess $siteAccess=null, ContainerInterface $container=null)
 Constructor. More...
 
 getServiceContainer ()
 Returns the Symfony Dependency Injection container if it has been injected, otherwise returns null. More...
 
 hasServiceContainer ()
 Checks whether the kernel handler has the Symfony Dependency Injection container or not. More...
 
 reInitialize ()
 Reinitializes the kernel environment. More...
 
 run ()
 Runs a legacy script. More...
 
 runCallback (\Closure $callback, $postReinitialize=true)
 Runs a callback function in the legacy kernel environment. More...
 
 setEmbeddedScriptPath ($scriptPath)
 Injects path to script to run in legacy context (relative to legacy root). More...
 
 setUseExceptions ($useExceptions)
 Not supported by CLIHandler. More...
 

Protected Attributes

 $container
 
 $embeddedScriptPath
 
 $script
 
 $sessionSettings
 

Private Member Functions

 sessionInit ()
 

Constructor & Destructor Documentation

eZ\Publish\Core\MVC\Legacy\Kernel\CLIHandler::__construct ( array  $settings = array(),
SiteAccess  $siteAccess = null,
ContainerInterface  $container = null 
)

Constructor.

Additional valid settings for $settings :

  • injected-settings : INI settings override
Parameters
array$settingsSettings to pass to eZScript constructor.
\eZ\Publish\Core\MVC\Symfony\SiteAccess$siteAccess
\Symfony\Component\DependencyInjection\ContainerInterface$container

Member Function Documentation

eZ\Publish\Core\MVC\Legacy\Kernel\CLIHandler::getServiceContainer ( )

Returns the Symfony Dependency Injection container if it has been injected, otherwise returns null.

Returns
|null
eZ\Publish\Core\MVC\Legacy\Kernel\CLIHandler::hasServiceContainer ( )

Checks whether the kernel handler has the Symfony Dependency Injection container or not.

Returns
boolean
eZ\Publish\Core\MVC\Legacy\Kernel\CLIHandler::reInitialize ( )

Reinitializes the kernel environment.

Returns
void
eZ\Publish\Core\MVC\Legacy\Kernel\CLIHandler::run ( )

Runs a legacy script.

Exceptions
\RuntimeException
eZ\Publish\Core\MVC\Legacy\Kernel\CLIHandler::runCallback ( \Closure  $callback,
  $postReinitialize = true 
)

Runs a callback function in the legacy kernel environment.

This is useful to run eZ Publish 4.x code from a non-related context (like eZ Publish 5)

Parameters
\Closure$callback
boolean$postReinitializeDefault is true. If set to false, the kernel environment will not be reinitialized. This can be useful to optimize several calls to the kernel within the same context.
Returns
mixed The result of the callback
eZ\Publish\Core\MVC\Legacy\Kernel\CLIHandler::sessionInit ( )
private
eZ\Publish\Core\MVC\Legacy\Kernel\CLIHandler::setEmbeddedScriptPath (   $scriptPath)

Injects path to script to run in legacy context (relative to legacy root).

Parameters
string$scriptPath
eZ\Publish\Core\MVC\Legacy\Kernel\CLIHandler::setUseExceptions (   $useExceptions)

Not supported by CLIHandler.

Parameters
boolean$useExceptions
Exceptions
\RuntimeException

Member Data Documentation

eZ\Publish\Core\MVC\Legacy\Kernel\CLIHandler::$container
protected
eZ\Publish\Core\MVC\Legacy\Kernel\CLIHandler::$embeddedScriptPath
protected
eZ\Publish\Core\MVC\Legacy\Kernel\CLIHandler::$script
protected
eZ\Publish\Core\MVC\Legacy\Kernel\CLIHandler::$sessionSettings
protected

The documentation for this class was generated from the following file: