PHP Class Neos\Flow\Core\Booting\Scripts

Show file Open project: neos/flow-development-collection Class Usage Examples

Public Methods

Method Description
buildPhpCommand ( array $settings ) : string
executeCommand ( string $commandIdentifier, array $settings, boolean $outputResults = true, array $commandArguments = [] ) : boolean Executes the given command as a sub-request to the Flow CLI system.
executeCommandAsync ( string $commandIdentifier, array $settings, array $commandArguments = [] ) : void Executes the given command as a sub-request to the Flow CLI system without waiting for the output.
forceFlushCachesIfNecessary ( Bootstrap $bootstrap ) : void Does some emergency, forced, low level flush caches if the user told to do so through the command line.
initializeCacheManagement ( Bootstrap $bootstrap ) : void Initializes the cache framework
initializeClassLoader ( Bootstrap $bootstrap ) : void Initializes the Class Loader
initializeClassLoaderClassesCache ( Bootstrap $bootstrap ) : void Injects the classes cache to the already initialized class loader
initializeConfiguration ( Bootstrap $bootstrap ) : void Initializes the Configuration Manager, the Flow settings and the Environment service
initializeErrorHandling ( Bootstrap $bootstrap ) : void Initializes the error handling
initializeObjectManager ( Bootstrap $bootstrap ) : void Initializes the runtime Object Manager
initializeObjectManagerCompileTimeCreate ( Bootstrap $bootstrap ) Initializes the Compiletime Object Manager (phase 1)
initializeObjectManagerCompileTimeFinalize ( Bootstrap $bootstrap ) : void Initializes the Compiletime Object Manager (phase 2)
initializePackageManagement ( Bootstrap $bootstrap ) : void Initializes the package system and loads the package configuration and settings provided by the packages.
initializeProxyClasses ( Bootstrap $bootstrap ) : void Runs the compile step if necessary
initializeReflectionService ( Bootstrap $bootstrap ) : void Initializes the Reflection Service
initializeResources ( Bootstrap $bootstrap ) : void Initialize the stream wrappers.
initializeSession ( Bootstrap $bootstrap ) : void Initializes the session framework
initializeSignalSlot ( Bootstrap $bootstrap ) : void Initializes the Signal Slot module
initializeSystemFileMonitor ( Bootstrap $bootstrap ) : void Checks if classes (i.e. php files containing classes), Policy.yaml, Objects.yaml or localization files have been altered and if so flushes the related caches.
initializeSystemLogger ( Bootstrap $bootstrap ) : void Initializes the System Logger
recompileClasses ( Bootstrap $bootstrap ) : void Recompile classes after file monitoring was executed and class files have been changed.
registerClassLoaderInAnnotationRegistry ( Bootstrap $bootstrap ) : void Register the class loader into the Doctrine AnnotationRegistry so the DocParser is able to load annation classes from packages.

Protected Methods

Method Description
buildSubprocessCommand ( string $commandIdentifier, array $settings, array $commandArguments = [] ) : string
compileDoctrineProxies ( Bootstrap $bootstrap ) : void Update Doctrine 2 proxy classes
getListOfPackagesWithConfiguredObjects ( Bootstrap $bootstrap ) : array
monitorDirectoryIfItExists ( FileMonitor $fileMonitor, string $path, string $filenamePattern = null ) : void Let the given file monitor track changes of the specified directory if it exists.
requireAutoloaderForPhpUnit ( ) : void Include the PHPUnit autoloader if PHPUnit is installed via PEAR.

Method Details

buildPhpCommand() public static method

public static buildPhpCommand ( array $settings ) : string
$settings array The Neos.Flow settings
return string A command line command for PHP, which can be extended and then exec()uted

buildSubprocessCommand() protected static method

protected static buildSubprocessCommand ( string $commandIdentifier, array $settings, array $commandArguments = [] ) : string
$commandIdentifier string E.g. neos.flow:cache:flush
$settings array The Neos.Flow settings
$commandArguments array Command arguments
return string A command line command ready for being exec()uted

compileDoctrineProxies() protected static method

This is not simply bound to the finishedCompilationRun signal because it needs the advised proxy classes to run. When that signal is fired, they have been written, but not loaded.
protected static compileDoctrineProxies ( Bootstrap $bootstrap ) : void
$bootstrap Neos\Flow\Core\Bootstrap
return void

executeCommand() public static method

Executes the given command as a sub-request to the Flow CLI system.
public static executeCommand ( string $commandIdentifier, array $settings, boolean $outputResults = true, array $commandArguments = [] ) : boolean
$commandIdentifier string E.g. neos.flow:cache:flush
$settings array The Neos.Flow settings
$outputResults boolean if FALSE the output of this command is only echoed if the execution was not successful
$commandArguments array Command arguments
return boolean TRUE if the command execution was successful (exit code = 0)

executeCommandAsync() public static method

Note: As the command execution is done in a separate thread potential exceptions or failures will *not* be reported
public static executeCommandAsync ( string $commandIdentifier, array $settings, array $commandArguments = [] ) : void
$commandIdentifier string E.g. neos.flow:cache:flush
$settings array The Neos.Flow settings
$commandArguments array Command arguments
return void

forceFlushCachesIfNecessary() public static method

Does some emergency, forced, low level flush caches if the user told to do so through the command line.
public static forceFlushCachesIfNecessary ( Bootstrap $bootstrap ) : void
$bootstrap Neos\Flow\Core\Bootstrap
return void

getListOfPackagesWithConfiguredObjects() protected static method

protected static getListOfPackagesWithConfiguredObjects ( Bootstrap $bootstrap ) : array
$bootstrap Neos\Flow\Core\Bootstrap
return array

initializeCacheManagement() public static method

Initializes the cache framework
public static initializeCacheManagement ( Bootstrap $bootstrap ) : void
$bootstrap Neos\Flow\Core\Bootstrap
return void

initializeClassLoader() public static method

Initializes the Class Loader
public static initializeClassLoader ( Bootstrap $bootstrap ) : void
$bootstrap Neos\Flow\Core\Bootstrap
return void

initializeClassLoaderClassesCache() public static method

Injects the classes cache to the already initialized class loader
public static initializeClassLoaderClassesCache ( Bootstrap $bootstrap ) : void
$bootstrap Neos\Flow\Core\Bootstrap
return void

initializeConfiguration() public static method

Initializes the Configuration Manager, the Flow settings and the Environment service
public static initializeConfiguration ( Bootstrap $bootstrap ) : void
$bootstrap Neos\Flow\Core\Bootstrap
return void

initializeErrorHandling() public static method

Initializes the error handling
public static initializeErrorHandling ( Bootstrap $bootstrap ) : void
$bootstrap Neos\Flow\Core\Bootstrap
return void

initializeObjectManager() public static method

Initializes the runtime Object Manager
public static initializeObjectManager ( Bootstrap $bootstrap ) : void
$bootstrap Neos\Flow\Core\Bootstrap
return void

initializeObjectManagerCompileTimeCreate() public static method

Initializes the Compiletime Object Manager (phase 1)
public static initializeObjectManagerCompileTimeCreate ( Bootstrap $bootstrap )
$bootstrap Neos\Flow\Core\Bootstrap

initializeObjectManagerCompileTimeFinalize() public static method

Initializes the Compiletime Object Manager (phase 2)
public static initializeObjectManagerCompileTimeFinalize ( Bootstrap $bootstrap ) : void
$bootstrap Neos\Flow\Core\Bootstrap
return void

initializePackageManagement() public static method

Initializes the package system and loads the package configuration and settings provided by the packages.
public static initializePackageManagement ( Bootstrap $bootstrap ) : void
$bootstrap Neos\Flow\Core\Bootstrap
return void

initializeProxyClasses() public static method

Runs the compile step if necessary
public static initializeProxyClasses ( Bootstrap $bootstrap ) : void
$bootstrap Neos\Flow\Core\Bootstrap
return void

initializeReflectionService() public static method

Initializes the Reflection Service
public static initializeReflectionService ( Bootstrap $bootstrap ) : void
$bootstrap Neos\Flow\Core\Bootstrap
return void

initializeResources() public static method

Initialize the stream wrappers.
public static initializeResources ( Bootstrap $bootstrap ) : void
$bootstrap Neos\Flow\Core\Bootstrap
return void

initializeSession() public static method

Initializes the session framework
public static initializeSession ( Bootstrap $bootstrap ) : void
$bootstrap Neos\Flow\Core\Bootstrap
return void

initializeSignalSlot() public static method

Initializes the Signal Slot module
public static initializeSignalSlot ( Bootstrap $bootstrap ) : void
$bootstrap Neos\Flow\Core\Bootstrap
return void

initializeSystemFileMonitor() public static method

This function only triggers the detection of changes in the file monitors. The actual cache flushing is handled by other functions which are triggered by the file monitor through a signal. For Flow, those signal-slot connections are defined in the class \Neos\Flow\Package.
public static initializeSystemFileMonitor ( Bootstrap $bootstrap ) : void
$bootstrap Neos\Flow\Core\Bootstrap
return void

initializeSystemLogger() public static method

Initializes the System Logger
public static initializeSystemLogger ( Bootstrap $bootstrap ) : void
$bootstrap Neos\Flow\Core\Bootstrap
return void

monitorDirectoryIfItExists() protected static method

Let the given file monitor track changes of the specified directory if it exists.
protected static monitorDirectoryIfItExists ( FileMonitor $fileMonitor, string $path, string $filenamePattern = null ) : void
$fileMonitor Neos\Flow\Monitor\FileMonitor
$path string
$filenamePattern string Optional pattern for filenames to consider for file monitoring (regular expression). @see FileMonitor::monitorDirectory()
return void

recompileClasses() public static method

Recompile classes after file monitoring was executed and class files have been changed.
public static recompileClasses ( Bootstrap $bootstrap ) : void
$bootstrap Neos\Flow\Core\Bootstrap
return void

registerClassLoaderInAnnotationRegistry() public static method

Register the class loader into the Doctrine AnnotationRegistry so the DocParser is able to load annation classes from packages.
public static registerClassLoaderInAnnotationRegistry ( Bootstrap $bootstrap ) : void
$bootstrap Neos\Flow\Core\Bootstrap
return void

requireAutoloaderForPhpUnit() protected static method

Include the PHPUnit autoloader if PHPUnit is installed via PEAR.
protected static requireAutoloaderForPhpUnit ( ) : void
return void