Zend Framework  3.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
TokenArrayScanner Class Reference

Public Member Functions

 __construct ($tokens, AnnotationManager $annotationManager=null)
 
 getAnnotationManager ()
 
 getDocComment ()
 Get doc comment.
 
 getNamespaces ()
 
 getUses ($namespace=null)
 
 getIncludes ()
 
 getClassNames ()
 
 getClasses ()
 
 getClass ($name)
 Return the class object from this scanner.
 
 getClassNameInformation ($className)
 
 getFunctionNames ()
 
 getFunctions ()
 
 __toString ()
 
 hasNamespace ($namespace)
 Check for namespace.
 

Static Public Member Functions

static export ($tokens)
 Export.
 

Protected Member Functions

 scan ()
 Scan.
 
 getUsesNoScan ($namespace)
 

Protected Attributes

 $isScanned = false
 
 $tokens = []
 
 $docComment = null
 
 $nameInformation = null
 
 $infos = []
 
 $annotationManager = null
 

Constructor & Destructor Documentation

__construct (   $tokens,
AnnotationManager  $annotationManager = null 
)
Parameters
null | array$tokens
null | AnnotationManager$annotationManager

Member Function Documentation

__toString ( )
static export (   $tokens)
static

Export.

Parameters
$tokens
getAnnotationManager ( )
Returns
AnnotationManager
getClass (   $name)

Return the class object from this scanner.

Parameters
string | int$name
Exceptions
Exception\InvalidArgumentException
Returns
ClassScanner
getClasses ( )
Returns
ClassScanner[]
getClassNameInformation (   $className)
Parameters
string$className
Returns
bool|null|NameInformation
getClassNames ( )
Returns
array
getDocComment ( )

Get doc comment.

Todo:
Assignment of $this->docComment should probably be done in scan() and then $this->getDocComment() just retrieves it.
Returns
string
getFunctionNames ( )
Returns
array
getFunctions ( )
Returns
array
getIncludes ( )
Returns
array
getNamespaces ( )
Returns
array
getUses (   $namespace = null)
Parameters
null | string$namespace
Returns
array|null
getUsesNoScan (   $namespace)
protected
Parameters
string$namespace
Returns
null|array
Exceptions
Exception\InvalidArgumentException
hasNamespace (   $namespace)

Check for namespace.

Parameters
string$namespace
Returns
bool
scan ( )
protected

Scan.

Todo:
: $this->docComment should be assigned for valid docblock during the scan instead of $this->getDocComment() (starting with T_DOC_COMMENT case)
Exceptions
Exception\RuntimeException

Variables & Setup

START FINITE STATE MACHINE FOR SCANNING TOKENS

END FINITE STATE MACHINE FOR SCANNING TOKENS

Member Data Documentation

$annotationManager = null
protected
$docComment = null
protected
$infos = []
protected
$isScanned = false
protected
$nameInformation = null
protected
$tokens = []
protected