PHP Class Zend\Code\Scanner\ClassScanner

Inheritance: implements ScannerInterface
Datei anzeigen Open project: zendframework/zend-code Class Usage Examples

Protected Properties

Property 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

Public Methods

Method 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

Protected Methods

Method 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 method

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

__toString() public method

public __toString ( )

export() public static method

public static export ( )

getAnnotations() public method

Get annotations
public getAnnotations ( Zend\Code\Annotation\AnnotationManager $annotationManager ) : Zend\Code\Annotation\AnnotationCollection
$annotationManager Zend\Code\Annotation\AnnotationManager
return Zend\Code\Annotation\AnnotationCollection

getBlockedTraitMethods() protected method

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

getConstant() public method

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

getConstantNames() public method

Return a list of constant names
public getConstantNames ( ) : array
return array

getConstants() public method

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

getDocBlock() public method

Return documentation block
public getDocBlock ( ) : false | Zend\Code\Scanner\DocBlockScanner
return false | Zend\Code\Scanner\DocBlockScanner

getDocComment() public method

Return documentation comment
public getDocComment ( ) : null | string
return null | string

getInterfaces() public method

Return a list of interface names
public getInterfaces ( ) : array
return array

getLineEnd() public method

Return number of last line
public getLineEnd ( ) : integer | null
return integer | null

getLineStart() public method

Return number of first line
public getLineStart ( ) : integer | null
return integer | null

getMethod() public method

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

getMethodNames() public method

Return a list of method names
public getMethodNames ( ) : array
return array

getMethods() public method

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

getName() public method

Return a name of class
public getName ( ) : null | string
return null | string

getParentClass() public method

Return a name of parent class
public getParentClass ( ) : null | string
return null | string

getProperties() public method

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

getProperty() public method

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

getPropertyNames() public method

Return a list of property names
public getPropertyNames ( ) : array
return array

getShortName() public method

Return short name of class
public getShortName ( ) : null | string
return null | string

getTraitAliases() public method

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

getTraitNames() public method

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

getTraits() public method

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

getVisibilityForAlias() protected method

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

hasConstant() public method

Verify if class has constant
public hasConstant ( string $name ) : boolean
$name string
return boolean

hasMethod() public method

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

hasParentClass() public method

Verify if class has parent
public hasParentClass ( ) : boolean
return boolean

hasProperty() public method

Verify if class has property
public hasProperty ( string $name ) : boolean
$name string
return boolean

isAbstract() public method

Verify if class is an abstract class
public isAbstract ( ) : boolean
return boolean

isFinal() public method

Verify if class is final
public isFinal ( ) : boolean
return boolean

isInstantiable() public method

Verify if class is instantiable
public isInstantiable ( ) : boolean
return boolean

isInterface() public method

Verify if class is an interface
public isInterface ( ) : boolean
return boolean

isTrait() public method

Verify if class is a trait
public isTrait ( ) : boolean
return boolean

scan() protected method

Scan tokens
protected scan ( ) : void
return void

Property Details

$docComment protected_oe property

protected string $docComment
return string

$infos protected_oe property

protected array $infos
return array

$interfaces protected_oe property

protected array $interfaces
return array

$isAbstract protected_oe property

protected bool $isAbstract
return boolean

$isFinal protected_oe property

protected bool $isFinal
return boolean

$isInterface protected_oe property

protected bool $isInterface
return boolean

$isScanned protected_oe property

protected bool $isScanned
return boolean

$isTrait protected_oe property

protected bool $isTrait
return boolean

$lineEnd protected_oe property

protected int $lineEnd
return integer

$lineStart protected_oe property

protected int $lineStart
return integer

$methods protected_oe property

protected array $methods
return array

$name protected_oe property

protected string $name
return string

$nameInformation protected_oe property

protected NameInformation,Zend\Code $nameInformation
return Zend\Code\NameInformation

$parentClass protected_oe property

protected string $parentClass
return string

$shortInterfaces protected_oe property

protected array $shortInterfaces
return array

$shortName protected_oe property

protected string $shortName
return string

$shortParentClass protected_oe property

protected string $shortParentClass
return string

$tokens protected_oe property

protected array $tokens
return array

$traits protected_oe property

protected array $traits
return array