PHP Class PHPSA\AliasManager

Afficher le fichier Open project: ovr/phpsa Class Usage Examples

Protected Properties

Свойство Type Description
$aliases a list of imported namespaces
$namespace string | null Current namespace, but this can be null

Méthodes publiques

Méthode Description
__construct ( string | null $namespace = null )
add ( string $namespace ) Imports a namespace as an alias via use statement.
getNamespace ( ) : null | string Gets the current namespace.
isClassImported ( string $classNS ) : boolean Checks whether a namespace was imported via use statement.
setNamespace ( null | string $namespace ) Sets the current namespace.

Method Details

__construct() public méthode

public __construct ( string | null $namespace = null )
$namespace string | null

add() public méthode

Imports a namespace as an alias via use statement.
public add ( string $namespace )
$namespace string

getNamespace() public méthode

Gets the current namespace.
public getNamespace ( ) : null | string
Résultat null | string

isClassImported() public méthode

Checks whether a namespace was imported via use statement.
public isClassImported ( string $classNS ) : boolean
$classNS string
Résultat boolean

setNamespace() public méthode

Sets the current namespace.
public setNamespace ( null | string $namespace )
$namespace null | string

Property Details

$aliases protected_oe property

a list of imported namespaces
protected $aliases

$namespace protected_oe property

Current namespace, but this can be null
protected string|null $namespace
Résultat string | null