PHP 인터페이스 XStatic\AliasLoaderInterface

파일 보기 프로젝트 열기: jeremeamia/xstatic

공개 메소드들

메소드 설명
addAlias ( string $alias, string $fqcn ) Creates an alias to a fully-qualified class name (FQCN)
isRegistered ( ) : boolean Checks if the the Alias Loader has already been registered
load ( string $fqcn ) Loads an alias by creating a class_alias() to the requested class. This is used as an autoload function
register ( boolean | string $rootNamespace = false ) : boolean Registers the Alias Loader as an autoloader so that aliases can be resolved via class_alias()

메소드 상세

addAlias() 공개 메소드

Creates an alias to a fully-qualified class name (FQCN)
public addAlias ( string $alias, string $fqcn )
$alias string Alias to associate with the class
$fqcn string FQCN of the class

isRegistered() 공개 메소드

Checks if the the Alias Loader has already been registered
public isRegistered ( ) : boolean
리턴 boolean

load() 공개 메소드

Loads an alias by creating a class_alias() to the requested class. This is used as an autoload function
public load ( string $fqcn )
$fqcn string FQCN of the class to be loaded

register() 공개 메소드

The Root Namespace can be configured such that the alias is created in a particular namespace. Valid values for the $rootNamespace parameter are as follows: - false - The alias will be created in the global namespace (default) - true - The alias will be created in the namespace where it is referenced - Any specific namespace (e.g., 'Foo\\Bar') - The alias is created in the specified namespace
public register ( boolean | string $rootNamespace = false ) : boolean
$rootNamespace boolean | string Namespace where the alias should be created
리턴 boolean Returns true if the registration was successful