PHP Class Zend\Code\Scanner\ClassScanner

Inheritance: implements ScannerInterface
Afficher le fichier Open project: zendframework/zend-code Class Usage Examples

Protected Properties

Свойство Type Description
$docComment string
$infos array
$interfaces array
$isAbstract boolean
$isFinal boolean
$isInterface boolean
$isScanned boolean
$isTrait boolean
$lineEnd integer
$lineStart integer
$methods array
$name string
$nameInformation Zend\Code\NameInformation
$parentClass string
$shortInterfaces array
$shortName string
$shortParentClass string
$tokens array
$traits array

Méthodes publiques

Méthode Description
__construct ( array $classTokens, Zend\Code\NameInformation $nameInformation = null ) : ClassScanner
__toString ( )
export ( )
getAnnotations ( Zend\Code\Annotation\AnnotationManager $annotationManager ) : Zend\Code\Annotation\AnnotationCollection Get annotations
getConstant ( string | integer $constantNameOrInfoIndex ) : boolean | Zend\Code\Scanner\ConstantScanner Return a single constant by given name or index of info
getConstantNames ( ) : array Return a list of constant names
getConstants ( boolean $namesOnly = true ) : array | Zend\Code\Scanner\ConstantScanner[] Return a list of constants
getDocBlock ( ) : false | Zend\Code\Scanner\DocBlockScanner Return documentation block
getDocComment ( ) : null | string Return documentation comment
getInterfaces ( ) : array Return a list of interface names
getLineEnd ( ) : integer | null Return number of last line
getLineStart ( ) : integer | null Return number of first line
getMethod ( string | integer $methodNameOrInfoIndex ) : Zend\Code\Scanner\MethodScanner Return a single method by given name or index of info
getMethodNames ( ) : array Return a list of method names
getMethods ( ) : Zend\Code\Scanner\MethodScanner[] Return a list of methods
getName ( ) : null | string Return a name of class
getParentClass ( ) : null | string Return a name of parent class
getProperties ( ) : Zend\Code\Scanner\PropertyScanner[] Return a list of properties
getProperty ( string | integer $propertyNameOrInfoIndex ) : boolean | Zend\Code\Scanner\PropertyScanner Return a single property by given name or index of info
getPropertyNames ( ) : array Return a list of property names
getShortName ( ) : null | string Return short name of class
getTraitAliases ( ) : array Retrieve a list of aliased traits used by the class.
getTraitNames ( ) : array Retrieve a list of trait names used by this class.
getTraits ( ) : ClassScanner[] Retrieve any traits used by the class.
hasConstant ( string $name ) : boolean Verify if class has constant
hasMethod ( string $name ) : boolean Verify if class has method by given name
hasParentClass ( ) : boolean Verify if class has parent
hasProperty ( string $name ) : boolean Verify if class has property
isAbstract ( ) : boolean Verify if class is an abstract class
isFinal ( ) : boolean Verify if class is final
isInstantiable ( ) : boolean Verify if class is instantiable
isInterface ( ) : boolean Verify if class is an interface
isTrait ( ) : boolean Verify if class is a trait

Méthodes protégées

Méthode Description
getBlockedTraitMethods ( ) : array Return an array of key = trait to keep, value = trait::method to ignore
getVisibilityForAlias ( mixed $aliasName ) : string Retrieve visibility for a given alias.
scan ( ) : void Scan tokens

Method Details

__construct() public méthode

public __construct ( array $classTokens, Zend\Code\NameInformation $nameInformation = null ) : ClassScanner
$classTokens array
$nameInformation Zend\Code\NameInformation
Résultat ClassScanner

__toString() public méthode

public __toString ( )

export() public static méthode

public static export ( )

getAnnotations() public méthode

Get annotations
public getAnnotations ( Zend\Code\Annotation\AnnotationManager $annotationManager ) : Zend\Code\Annotation\AnnotationCollection
$annotationManager Zend\Code\Annotation\AnnotationManager
Résultat Zend\Code\Annotation\AnnotationCollection

getBlockedTraitMethods() protected méthode

Return an array of key = trait to keep, value = trait::method to ignore
protected getBlockedTraitMethods ( ) : array
Résultat array

getConstant() public méthode

Return a single constant by given name or index of info
public getConstant ( string | integer $constantNameOrInfoIndex ) : boolean | Zend\Code\Scanner\ConstantScanner
$constantNameOrInfoIndex string | integer
Résultat boolean | Zend\Code\Scanner\ConstantScanner

getConstantNames() public méthode

Return a list of constant names
public getConstantNames ( ) : array
Résultat array

getConstants() public méthode

Return a list of constants
public getConstants ( boolean $namesOnly = true ) : array | Zend\Code\Scanner\ConstantScanner[]
$namesOnly boolean Set false to return instances of ConstantScanner
Résultat array | Zend\Code\Scanner\ConstantScanner[]

getDocBlock() public méthode

Return documentation block
public getDocBlock ( ) : false | Zend\Code\Scanner\DocBlockScanner
Résultat false | Zend\Code\Scanner\DocBlockScanner

getDocComment() public méthode

Return documentation comment
public getDocComment ( ) : null | string
Résultat null | string

getInterfaces() public méthode

Return a list of interface names
public getInterfaces ( ) : array
Résultat array

getLineEnd() public méthode

Return number of last line
public getLineEnd ( ) : integer | null
Résultat integer | null

getLineStart() public méthode

Return number of first line
public getLineStart ( ) : integer | null
Résultat integer | null

getMethod() public méthode

Return a single method by given name or index of info
public getMethod ( string | integer $methodNameOrInfoIndex ) : Zend\Code\Scanner\MethodScanner
$methodNameOrInfoIndex string | integer
Résultat Zend\Code\Scanner\MethodScanner

getMethodNames() public méthode

Return a list of method names
public getMethodNames ( ) : array
Résultat array

getMethods() public méthode

Return a list of methods
public getMethods ( ) : Zend\Code\Scanner\MethodScanner[]
Résultat Zend\Code\Scanner\MethodScanner[]

getName() public méthode

Return a name of class
public getName ( ) : null | string
Résultat null | string

getParentClass() public méthode

Return a name of parent class
public getParentClass ( ) : null | string
Résultat null | string

getProperties() public méthode

Return a list of properties
public getProperties ( ) : Zend\Code\Scanner\PropertyScanner[]
Résultat Zend\Code\Scanner\PropertyScanner[]

getProperty() public méthode

Return a single property by given name or index of info
public getProperty ( string | integer $propertyNameOrInfoIndex ) : boolean | Zend\Code\Scanner\PropertyScanner
$propertyNameOrInfoIndex string | integer
Résultat boolean | Zend\Code\Scanner\PropertyScanner

getPropertyNames() public méthode

Return a list of property names
public getPropertyNames ( ) : array
Résultat array

getShortName() public méthode

Return short name of class
public getShortName ( ) : null | string
Résultat null | string

getTraitAliases() public méthode

Retrieve a list of aliased traits used by the class.
public getTraitAliases ( ) : array
Résultat array

getTraitNames() public méthode

Retrieve a list of trait names used by this class.
public getTraitNames ( ) : array
Résultat array

getTraits() public méthode

Retrieve any traits used by the class.
public getTraits ( ) : ClassScanner[]
Résultat ClassScanner[]

getVisibilityForAlias() protected méthode

Retrieve visibility for a given alias.
protected getVisibilityForAlias ( mixed $aliasName ) : string
$aliasName mixed
Résultat string

hasConstant() public méthode

Verify if class has constant
public hasConstant ( string $name ) : boolean
$name string
Résultat boolean

hasMethod() public méthode

Verify if class has method by given name
public hasMethod ( string $name ) : boolean
$name string
Résultat boolean

hasParentClass() public méthode

Verify if class has parent
public hasParentClass ( ) : boolean
Résultat boolean

hasProperty() public méthode

Verify if class has property
public hasProperty ( string $name ) : boolean
$name string
Résultat boolean

isAbstract() public méthode

Verify if class is an abstract class
public isAbstract ( ) : boolean
Résultat boolean

isFinal() public méthode

Verify if class is final
public isFinal ( ) : boolean
Résultat boolean

isInstantiable() public méthode

Verify if class is instantiable
public isInstantiable ( ) : boolean
Résultat boolean

isInterface() public méthode

Verify if class is an interface
public isInterface ( ) : boolean
Résultat boolean

isTrait() public méthode

Verify if class is a trait
public isTrait ( ) : boolean
Résultat boolean

scan() protected méthode

Scan tokens
protected scan ( ) : void
Résultat void

Property Details

$docComment protected_oe property

protected string $docComment
Résultat string

$infos protected_oe property

protected array $infos
Résultat array

$interfaces protected_oe property

protected array $interfaces
Résultat array

$isAbstract protected_oe property

protected bool $isAbstract
Résultat boolean

$isFinal protected_oe property

protected bool $isFinal
Résultat boolean

$isInterface protected_oe property

protected bool $isInterface
Résultat boolean

$isScanned protected_oe property

protected bool $isScanned
Résultat boolean

$isTrait protected_oe property

protected bool $isTrait
Résultat boolean

$lineEnd protected_oe property

protected int $lineEnd
Résultat integer

$lineStart protected_oe property

protected int $lineStart
Résultat integer

$methods protected_oe property

protected array $methods
Résultat array

$name protected_oe property

protected string $name
Résultat string

$nameInformation protected_oe property

protected NameInformation,Zend\Code $nameInformation
Résultat Zend\Code\NameInformation

$parentClass protected_oe property

protected string $parentClass
Résultat string

$shortInterfaces protected_oe property

protected array $shortInterfaces
Résultat array

$shortName protected_oe property

protected string $shortName
Résultat string

$shortParentClass protected_oe property

protected string $shortParentClass
Résultat string

$tokens protected_oe property

protected array $tokens
Résultat array

$traits protected_oe property

protected array $traits
Résultat array