PHP Class Neos\Flow\ObjectManagement\Proxy\Compiler

Afficher le fichier Open project: neos/flow-development-collection Class Usage Examples

Protected Properties

Свойство Type Description
$blacklistedSubPackages array Hardcoded list of Flow sub packages which must be immune proxying for security, technical or conceptual reasons.
$blacklistedSubPackagesLength integer See above.
$classesCache Neos\Cache\Frontend\PhpFrontend
$objectManager Neos\Flow\ObjectManagement\CompileTimeObjectManager
$proxyClasses array
$reflectionService Neos\Flow\Reflection\ReflectionService
$settings array
$storedProxyClasses array The final map of proxy classes that end up in the cache.

Méthodes publiques

Méthode Description
__construct ( ) Compiler constructor.
compile ( ) : integer Compiles the configured proxy classes and methods as static PHP code and stores it in the proxy class code cache.
getProxyClass ( string $fullClassName ) : ProxyClass | boolean Returns a proxy class object for the specified original class.
getStoredProxyClassMap ( ) : string
hasCacheEntryForClass ( string $fullClassName ) : boolean Checks if the specified class still exists in the code cache. If that is the case, it means that obviously the proxy class doesn't have to be rebuilt because otherwise the cache would have been flushed by the file monitor or some other mechanism.
injectClassesCache ( PhpFrontend $classesCache ) : void Injects the cache for storing the renamed original classes and proxy classes
injectObjectManager ( CompileTimeObjectManager $objectManager ) : void
injectReflectionService ( ReflectionService $reflectionService ) : void
injectSettings ( array $settings ) : void Injects the Flow settings
renderAnnotation ( Doctrine\Common\Annotations\Annotation $annotation ) : string Render the source (string) form of an Annotation instance.

Méthodes protégées

Méthode Description
cacheOriginalClassFileAndProxyCode ( string $className, string $pathAndFilename, string $proxyClassCode ) : void Reads the specified class file, appends ORIGINAL_CLASSNAME_SUFFIX to its class name and stores the result in the proxy classes cache.
renderOptionArrayValueAsString ( array $optionValue ) : string Render an array value as string for an annotation.
stripOpeningPhpTag ( string $classCode ) : string Removes the first opening php tag ("

Method Details

__construct() public méthode

Compiler constructor.
public __construct ( )

cacheOriginalClassFileAndProxyCode() protected méthode

Reads the specified class file, appends ORIGINAL_CLASSNAME_SUFFIX to its class name and stores the result in the proxy classes cache.
protected cacheOriginalClassFileAndProxyCode ( string $className, string $pathAndFilename, string $proxyClassCode ) : void
$className string Short class name of the class to copy
$pathAndFilename string Full path and filename of the original class file
$proxyClassCode string The code that makes up the proxy class
Résultat void

compile() public méthode

Also builds the static object container which acts as a registry for non-prototype objects during runtime.
public compile ( ) : integer
Résultat integer Number of classes which have been compiled

getProxyClass() public méthode

If no such proxy class has been created yet by this renderer, this function will create one and register it for later use. If the class is not proxable, FALSE will be returned
public getProxyClass ( string $fullClassName ) : ProxyClass | boolean
$fullClassName string Name of the original class
Résultat ProxyClass | boolean

getStoredProxyClassMap() public méthode

public getStoredProxyClassMap ( ) : string
Résultat string

hasCacheEntryForClass() public méthode

Checks if the specified class still exists in the code cache. If that is the case, it means that obviously the proxy class doesn't have to be rebuilt because otherwise the cache would have been flushed by the file monitor or some other mechanism.
public hasCacheEntryForClass ( string $fullClassName ) : boolean
$fullClassName string Name of the original class
Résultat boolean TRUE if a cache entry exists

injectClassesCache() public méthode

Injects the cache for storing the renamed original classes and proxy classes
public injectClassesCache ( PhpFrontend $classesCache ) : void
$classesCache Neos\Cache\Frontend\PhpFrontend
Résultat void

injectObjectManager() public méthode

public injectObjectManager ( CompileTimeObjectManager $objectManager ) : void
$objectManager Neos\Flow\ObjectManagement\CompileTimeObjectManager
Résultat void

injectReflectionService() public méthode

public injectReflectionService ( ReflectionService $reflectionService ) : void
$reflectionService Neos\Flow\Reflection\ReflectionService
Résultat void

injectSettings() public méthode

Injects the Flow settings
public injectSettings ( array $settings ) : void
$settings array The settings
Résultat void

renderAnnotation() public static méthode

Render the source (string) form of an Annotation instance.
public static renderAnnotation ( Doctrine\Common\Annotations\Annotation $annotation ) : string
$annotation Doctrine\Common\Annotations\Annotation
Résultat string

renderOptionArrayValueAsString() protected static méthode

Render an array value as string for an annotation.
protected static renderOptionArrayValueAsString ( array $optionValue ) : string
$optionValue array
Résultat string

stripOpeningPhpTag() protected méthode

Removes the first opening php tag ("
protected stripOpeningPhpTag ( string $classCode ) : string
$classCode string
Résultat string the original class code without opening php tag

Property Details

$blacklistedSubPackages protected_oe property

Hardcoded list of Flow sub packages which must be immune proxying for security, technical or conceptual reasons.
protected array $blacklistedSubPackages
Résultat array

$blacklistedSubPackagesLength protected_oe property

See above.
protected int $blacklistedSubPackagesLength
Résultat integer

$classesCache protected_oe property

protected PhpFrontend,Neos\Cache\Frontend $classesCache
Résultat Neos\Cache\Frontend\PhpFrontend

$objectManager protected_oe property

protected CompileTimeObjectManager,Neos\Flow\ObjectManagement $objectManager
Résultat Neos\Flow\ObjectManagement\CompileTimeObjectManager

$proxyClasses protected_oe property

protected array $proxyClasses
Résultat array

$reflectionService protected_oe property

protected ReflectionService,Neos\Flow\Reflection $reflectionService
Résultat Neos\Flow\Reflection\ReflectionService

$settings protected_oe property

protected array $settings
Résultat array

$storedProxyClasses protected_oe property

The final map of proxy classes that end up in the cache.
protected array $storedProxyClasses
Résultat array