PHP 클래스 Neos\Flow\Core\ClassLoader

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

보호된 프로퍼티들

프로퍼티 타입 설명
$availableProxyClasses array
$classesCache Neos\Cache\Frontend\PhpFrontend
$considerTestsNamespace boolean
$fallbackClassPaths array
$ignoredClassNames array
$nonExistentClasses array Usually these will be annotations that have no class.
$packageNamespaces array A list of namespaces this class loader is definitely responsible for.

공개 메소드들

메소드 설명
__construct ( ApplicationContext $context = null, array $defaultPackageEntries = [] )
createFallbackPathEntry ( string $path ) : void Adds an entry to the fallback path map. MappingType for this kind of paths is always PSR4 as no package namespace is used then.
initializeAvailableProxyClasses ( ApplicationContext $context = null ) : void Initialize available proxy classes from the cached list.
injectClassesCache ( PhpFrontend $classesCache ) : void Injects the cache for storing the renamed original classes
isAutoloadTypeWithPredictableClassPath ( string $mappingType ) : boolean Is the given mapping type predictable in terms of path to class name
loadClass ( string $className ) : boolean Loads php files containing classes or interfaces found in the classes directory of a package and specifically registered classes.
setConsiderTestsNamespace ( boolean $flag ) : void Sets the flag which enables or disables autoloading support for functional test files.
setPackages ( array $activePackages ) : void Sets the available packages

보호된 메소드들

메소드 설명
buildClassPathWithPsr0 ( array $classNameParts, string $classPath ) : string Try to build a path to a class according to PSR-0 rules.
buildClassPathWithPsr4 ( array $classNameParts, string $classPath, integer $packageNamespacePartCount ) : string Try to build a path to a class according to PSR-4 rules.
createNamespaceMapEntry ( string $namespace, string $classPath, string $mappingType = self::MAPPING_TYPE_PSR0 ) : void Add a namespace to class path mapping to the class loader for resolving classes.
loadClassFromPossiblePaths ( array $possiblePaths, array $namespaceParts, integer $packageNamespacePartCount ) : boolean Tries to load a class from a list of possible paths. This is needed because packages are not prefix-free; i.e.
removeNamespaceMapEntry ( string $namespace, string $classPath, string $mappingType = self::MAPPING_TYPE_PSR0 ) : void Tries to remove a possibly existing namespace to class path map entry.

메소드 상세

__construct() 공개 메소드

public __construct ( ApplicationContext $context = null, array $defaultPackageEntries = [] )
$context ApplicationContext
$defaultPackageEntries array Adds default entries for packages that should be available for very early loading

buildClassPathWithPsr0() 보호된 메소드

Try to build a path to a class according to PSR-0 rules.
protected buildClassPathWithPsr0 ( array $classNameParts, string $classPath ) : string
$classNameParts array Parts of the FQ classname.
$classPath string Already detected class path to a possible package.
리턴 string

buildClassPathWithPsr4() 보호된 메소드

Try to build a path to a class according to PSR-4 rules.
protected buildClassPathWithPsr4 ( array $classNameParts, string $classPath, integer $packageNamespacePartCount ) : string
$classNameParts array Parts of the FQ classname.
$classPath string Already detected class path to a possible package.
$packageNamespacePartCount integer Amount of parts of the className that is also part of the package namespace.
리턴 string

createFallbackPathEntry() 공개 메소드

Adds an entry to the fallback path map. MappingType for this kind of paths is always PSR4 as no package namespace is used then.
public createFallbackPathEntry ( string $path ) : void
$path string The fallback path to search in.
리턴 void

createNamespaceMapEntry() 보호된 메소드

Add a namespace to class path mapping to the class loader for resolving classes.
protected createNamespaceMapEntry ( string $namespace, string $classPath, string $mappingType = self::MAPPING_TYPE_PSR0 ) : void
$namespace string A namespace to map to a class path.
$classPath string The class path to be mapped.
$mappingType string The mapping type for this mapping entry. Currently one of self::MAPPING_TYPE_PSR0 or self::MAPPING_TYPE_PSR4 will work. Defaults to self::MAPPING_TYPE_PSR0
리턴 void

initializeAvailableProxyClasses() 공개 메소드

Initialize available proxy classes from the cached list.
public initializeAvailableProxyClasses ( ApplicationContext $context = null ) : void
$context ApplicationContext
리턴 void

injectClassesCache() 공개 메소드

Injects the cache for storing the renamed original classes
public injectClassesCache ( PhpFrontend $classesCache ) : void
$classesCache Neos\Cache\Frontend\PhpFrontend
리턴 void

isAutoloadTypeWithPredictableClassPath() 공개 정적인 메소드

Is the given mapping type predictable in terms of path to class name
public static isAutoloadTypeWithPredictableClassPath ( string $mappingType ) : boolean
$mappingType string
리턴 boolean

loadClass() 공개 메소드

Loads php files containing classes or interfaces found in the classes directory of a package and specifically registered classes.
public loadClass ( string $className ) : boolean
$className string Name of the class/interface to load
리턴 boolean

loadClassFromPossiblePaths() 보호된 메소드

there may exist a package "Neos" and a package "Neos.NodeTypes" -- so a class Neos\NodeTypes\Foo must be first loaded (if it exists) from Neos.NodeTypes, falling back to Neos afterwards.
protected loadClassFromPossiblePaths ( array $possiblePaths, array $namespaceParts, integer $packageNamespacePartCount ) : boolean
$possiblePaths array
$namespaceParts array
$packageNamespacePartCount integer
리턴 boolean

removeNamespaceMapEntry() 보호된 메소드

Tries to remove a possibly existing namespace to class path map entry.
protected removeNamespaceMapEntry ( string $namespace, string $classPath, string $mappingType = self::MAPPING_TYPE_PSR0 ) : void
$namespace string A namespace mapped to a class path.
$classPath string The class path to be removed.
$mappingType string The mapping type for this mapping entry. Currently one of self::MAPPING_TYPE_PSR0 or self::MAPPING_TYPE_PSR4 will work. Defaults to self::MAPPING_TYPE_PSR0
리턴 void

setConsiderTestsNamespace() 공개 메소드

Sets the flag which enables or disables autoloading support for functional test files.
public setConsiderTestsNamespace ( boolean $flag ) : void
$flag boolean
리턴 void

setPackages() 공개 메소드

Sets the available packages
public setPackages ( array $activePackages ) : void
$activePackages array An array of \Neos\Flow\Package\Package objects
리턴 void

프로퍼티 상세

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

protected array $availableProxyClasses
리턴 array

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

protected PhpFrontend,Neos\Cache\Frontend $classesCache
리턴 Neos\Cache\Frontend\PhpFrontend

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

protected bool $considerTestsNamespace
리턴 boolean

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

protected array $fallbackClassPaths
리턴 array

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

protected array $ignoredClassNames
리턴 array

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

Usually these will be annotations that have no class.
protected array $nonExistentClasses
리턴 array

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

A list of namespaces this class loader is definitely responsible for.
protected array $packageNamespaces
리턴 array