PHP 클래스 Neos\Flow\Core\Bootstrap

파일 보기 프로젝트 열기: neos/flow-development-collection 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$staticObjectManager Neos\Flow\ObjectManagement\ObjectManagerInterface The same instance like $objectManager, but static, for use in the proxy classes.

보호된 프로퍼티들

프로퍼티 타입 설명
$activeRequestHandler Neos\Flow\Core\RequestHandlerInterface
$compiletimeCommands array
$context ApplicationContext
$earlyInstances array
$preselectedRequestHandlerClassName string
$requestHandlers array

공개 메소드들

메소드 설명
__construct ( string $context ) Constructor
buildCompiletimeSequence ( ) : Sequence Builds a boot sequence starting all modules necessary for the compiletime state.
buildEssentialsSequence ( string $identifier ) : Sequence Builds a boot sequence with the minimum modules necessary for both, compiletime and runtime.
buildRuntimeSequence ( ) : Sequence Builds a boot sequence starting all modules necessary for the runtime state.
getActiveRequestHandler ( ) : Neos\Flow\Core\RequestHandlerInterface Returns the request handler (if any) which is currently handling the request.
getContext ( ) : ApplicationContext Returns the context this bootstrap was started in.
getEarlyInstance ( string $objectName ) : object Returns an instance which was registered earlier through setEarlyInstance()
getEarlyInstances ( ) : array Returns all registered early instances indexed by object name
getEnvironmentConfigurationSetting ( string $variableName ) : string Tries to find an environment setting with the following fallback chain:
getObjectManager ( ) : Neos\Flow\ObjectManagement\ObjectManagerInterface Returns the object manager instance
getSignalSlotDispatcher ( ) : Dispatcher Returns the signal slot dispatcher instance
initializePersistenceManager ( ) : Neos\Flow\Persistence\PersistenceManagerInterface
isCompiletimeCommand ( string $commandIdentifier ) : boolean Tells if the given command controller is registered for compiletime or not.
registerCompiletimeCommand ( string $commandIdentifier ) : void Registers a command specified by the given identifier to be called during compiletime (versus runtime). The related command controller must be totally aware of the limited functionality Flow provides at compiletime.
registerRequestHandler ( Neos\Flow\Core\RequestHandlerInterface $requestHandler ) : void Registers a request handler which can possibly handle a request.
run ( ) : void Bootstraps the minimal infrastructure, resolves a fitting request handler and then passes control over to that request handler.
setActiveRequestHandler ( Neos\Flow\Core\RequestHandlerInterface $requestHandler ) : void Explicitly sets the active request handler.
setEarlyInstance ( string $objectName, object $instance ) : void Registers the instance of the specified object for an early boot stage.
setPreselectedRequestHandlerClassName ( string $className ) Preselects a specific request handler. If such a request handler exists, it will be used if it can handle the request – regardless of the priority of this or other request handlers.
shutdown ( string $runlevel ) : void Initiates the shutdown procedure to safely close all connections, save modified data and commit other tasks necessary to cleanly exit Flow.

보호된 메소드들

메소드 설명
defineConstants ( ) : void Defines various path constants used by Flow and if no root path or web root was specified by an environment variable, exits with a respective error message.
emitBootstrapShuttingDown ( string $runLevel ) : void Emits a signal that the bootstrap finished and is shutting down.
emitFinishedCompiletimeRun ( ) : void Emits a signal that the compile run was finished.
emitFinishedRuntimeRun ( ) : void Emits a signal that the runtime run was finished.
ensureRequiredEnvironment ( ) : void Checks PHP version and other parameters of the environment
resolveRequestHandler ( ) : Neos\Flow\Core\RequestHandlerInterface Iterates over the registered request handlers and determines which one fits best.

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( string $context )
$context string The application context, for example "Production" or "Development"

buildCompiletimeSequence() 공개 메소드

This includes all of the "essentials" sequence.
public buildCompiletimeSequence ( ) : Sequence
리턴 Neos\Flow\Core\Booting\Sequence

buildEssentialsSequence() 공개 메소드

Builds a boot sequence with the minimum modules necessary for both, compiletime and runtime.
public buildEssentialsSequence ( string $identifier ) : Sequence
$identifier string
리턴 Neos\Flow\Core\Booting\Sequence

buildRuntimeSequence() 공개 메소드

This includes all of the "essentials" sequence.
public buildRuntimeSequence ( ) : Sequence
리턴 Neos\Flow\Core\Booting\Sequence

defineConstants() 보호된 메소드

Defines various path constants used by Flow and if no root path or web root was specified by an environment variable, exits with a respective error message.
protected defineConstants ( ) : void
리턴 void

emitBootstrapShuttingDown() 보호된 메소드

Emits a signal that the bootstrap finished and is shutting down.
protected emitBootstrapShuttingDown ( string $runLevel ) : void
$runLevel string
리턴 void

emitFinishedCompiletimeRun() 보호된 메소드

Emits a signal that the compile run was finished.
protected emitFinishedCompiletimeRun ( ) : void
리턴 void

emitFinishedRuntimeRun() 보호된 메소드

Emits a signal that the runtime run was finished.
protected emitFinishedRuntimeRun ( ) : void
리턴 void

ensureRequiredEnvironment() 보호된 메소드

Checks PHP version and other parameters of the environment
protected ensureRequiredEnvironment ( ) : void
리턴 void

getActiveRequestHandler() 공개 메소드

Returns the request handler (if any) which is currently handling the request.
public getActiveRequestHandler ( ) : Neos\Flow\Core\RequestHandlerInterface
리턴 Neos\Flow\Core\RequestHandlerInterface

getContext() 공개 메소드

Returns the context this bootstrap was started in.
public getContext ( ) : ApplicationContext
리턴 ApplicationContext The context encapsulated in an object, for example "Development" or "Development/MyDeployment"

getEarlyInstance() 공개 메소드

Returns an instance which was registered earlier through setEarlyInstance()
public getEarlyInstance ( string $objectName ) : object
$objectName string Object name of the registered instance
리턴 object

getEarlyInstances() 공개 메소드

Returns all registered early instances indexed by object name
public getEarlyInstances ( ) : array
리턴 array

getEnvironmentConfigurationSetting() 공개 정적인 메소드

- getenv with $variableName - getenv with REDIRECT_ . $variableName (this is for php cgi where environment variables from the http server get prefixed) - $_SERVER[$variableName] (this is an alternative to set FLOW_* environment variables if passing environment variables is not possible) - $_SERVER[REDIRECT_ . $variableName] (again for php cgi environments)
public static getEnvironmentConfigurationSetting ( string $variableName ) : string
$variableName string
리턴 string or NULL if this variable was not set at all.

getObjectManager() 공개 메소드

Returns the object manager instance
public getObjectManager ( ) : Neos\Flow\ObjectManagement\ObjectManagerInterface
리턴 Neos\Flow\ObjectManagement\ObjectManagerInterface

getSignalSlotDispatcher() 공개 메소드

Returns the signal slot dispatcher instance
public getSignalSlotDispatcher ( ) : Dispatcher
리턴 Neos\Flow\SignalSlot\Dispatcher

initializePersistenceManager() 공개 메소드

public initializePersistenceManager ( ) : Neos\Flow\Persistence\PersistenceManagerInterface
리턴 Neos\Flow\Persistence\PersistenceManagerInterface

isCompiletimeCommand() 공개 메소드

Tells if the given command controller is registered for compiletime or not.
public isCompiletimeCommand ( string $commandIdentifier ) : boolean
$commandIdentifier string Package key, controller name and command name separated by colon, e.g. "neos.flow:cache:flush"
리턴 boolean

registerCompiletimeCommand() 공개 메소드

Registers a command specified by the given identifier to be called during compiletime (versus runtime). The related command controller must be totally aware of the limited functionality Flow provides at compiletime.
public registerCompiletimeCommand ( string $commandIdentifier ) : void
$commandIdentifier string Package key, controller name and command name separated by colon, e.g. "neos.flow:core:shell", wildcard for command name possible: "neos.flow:core:*"
리턴 void

registerRequestHandler() 공개 메소드

All registered request handlers will be queried if they can handle a request when the bootstrap's run() method is called.
public registerRequestHandler ( Neos\Flow\Core\RequestHandlerInterface $requestHandler ) : void
$requestHandler Neos\Flow\Core\RequestHandlerInterface
리턴 void

resolveRequestHandler() 보호된 메소드

Iterates over the registered request handlers and determines which one fits best.
protected resolveRequestHandler ( ) : Neos\Flow\Core\RequestHandlerInterface
리턴 Neos\Flow\Core\RequestHandlerInterface A request handler

run() 공개 메소드

Bootstraps the minimal infrastructure, resolves a fitting request handler and then passes control over to that request handler.
public run ( ) : void
리턴 void

setActiveRequestHandler() 공개 메소드

This method makes only sense to use during functional tests. During a functional test run the active request handler chosen by the bootstrap will be a command line request handler specialized on running functional tests. A functional test case can then set the active request handler to one which simulates, for example, an HTTP request.
public setActiveRequestHandler ( Neos\Flow\Core\RequestHandlerInterface $requestHandler ) : void
$requestHandler Neos\Flow\Core\RequestHandlerInterface
리턴 void

setEarlyInstance() 공개 메소드

On finalizing the Object Manager initialization, all those instances will be transferred to the Object Manager's registry.
public setEarlyInstance ( string $objectName, object $instance ) : void
$objectName string Object name, as later used by the Object Manager
$instance object The instance to register
리턴 void

setPreselectedRequestHandlerClassName() 공개 메소드

Preselects a specific request handler. If such a request handler exists, it will be used if it can handle the request – regardless of the priority of this or other request handlers.
public setPreselectedRequestHandlerClassName ( string $className )
$className string

shutdown() 공개 메소드

This method should be called by a request handler after a successful run. Control is returned to the request handler which can exit the application as it sees fit.
public shutdown ( string $runlevel ) : void
$runlevel string one of the RUNLEVEL_* constants
리턴 void

프로퍼티 상세

$activeRequestHandler 보호되어 있는 프로퍼티

protected RequestHandlerInterface,Neos\Flow\Core $activeRequestHandler
리턴 Neos\Flow\Core\RequestHandlerInterface

$compiletimeCommands 보호되어 있는 프로퍼티

protected array $compiletimeCommands
리턴 array

$context 보호되어 있는 프로퍼티

protected ApplicationContext,Neos\Flow\Core $context
리턴 ApplicationContext

$earlyInstances 보호되어 있는 프로퍼티

protected array $earlyInstances
리턴 array

$preselectedRequestHandlerClassName 보호되어 있는 프로퍼티

protected string $preselectedRequestHandlerClassName
리턴 string

$requestHandlers 보호되어 있는 프로퍼티

protected array $requestHandlers
리턴 array

$staticObjectManager 공개적으로 정적으로 프로퍼티

The same instance like $objectManager, but static, for use in the proxy classes.
public static ObjectManagerInterface,Neos\Flow\ObjectManagement $staticObjectManager
리턴 Neos\Flow\ObjectManagement\ObjectManagerInterface