PHP 클래스 Pop\Loader\Autoloader

저자: Nick Sagona, III ([email protected])
파일 보기 프로젝트 열기: nicksagona/PopPHP 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$classmap array Class map array.
$fallback boolean Flag to make the autoloader the fallback autoloader or not
$prefixes array Array of available namespaces prefixes.
$suppress boolean Flag to suppress warnings

공개 메소드들

메소드 설명
__construct ( boolean $self = true ) : Autoloader Constructor
__invoke ( string $class ) : void Invoke the class
factory ( boolean $self = true ) : Autoloader Static method to instantiate the autoloader object
loadClassMap ( string $classmap ) : Autoloader Load a class map file
register ( string $namespace, string $directory ) : Autoloader Register a namespace and directory location with the autoloader
splAutoloadRegister ( boolean $suppress = true, boolean $fallback = false ) : Autoloader Register the autoloader instance with the SPL

메소드 상세

__construct() 공개 메소드

Instantiate the archive object
public __construct ( boolean $self = true ) : Autoloader
$self boolean
리턴 Autoloader

__invoke() 공개 메소드

Credit to Andreas Schipplock for helping to improve this method: https://github.com/schipplock
public __invoke ( string $class ) : void
$class string
리턴 void

factory() 공개 정적인 메소드

Static method to instantiate the autoloader object
public static factory ( boolean $self = true ) : Autoloader
$self boolean
리턴 Autoloader

loadClassMap() 공개 메소드

Load a class map file
public loadClassMap ( string $classmap ) : Autoloader
$classmap string
리턴 Autoloader

register() 공개 메소드

Register a namespace and directory location with the autoloader
public register ( string $namespace, string $directory ) : Autoloader
$namespace string
$directory string
리턴 Autoloader

splAutoloadRegister() 공개 메소드

Register the autoloader instance with the SPL
public splAutoloadRegister ( boolean $suppress = true, boolean $fallback = false ) : Autoloader
$suppress boolean
$fallback boolean
리턴 Autoloader

프로퍼티 상세

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

Class map array.
protected array $classmap
리턴 array

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

Flag to make the autoloader the fallback autoloader or not
protected bool $fallback
리턴 boolean

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

Array of available namespaces prefixes.
protected array $prefixes
리턴 array

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

Flag to suppress warnings
protected bool $suppress
리턴 boolean