Constants

ST_OUT

ST_OUT

ST_FUNCTION_FOUND

ST_FUNCTION_FOUND

ST_SKIPPING_BLOCK_NOSTRING

ST_SKIPPING_BLOCK_NOSTRING

ST_SKIPPING_BLOCK_STRING

ST_SKIPPING_BLOCK_STRING

ST_CLASS_FOUND

ST_CLASS_FOUND

ST_DEFINE_FOUND

ST_DEFINE_FOUND

ST_DEFINE_2

ST_DEFINE_2

ST_SKIPPING_TO_EOL

ST_SKIPPING_TO_EOL

ST_NAMESPACE_FOUND

ST_NAMESPACE_FOUND

ST_NAMESPACE_2

ST_NAMESPACE_2

ST_CONST_FOUND

ST_CONST_FOUND

AUTOMAP_COMMENT

AUTOMAP_COMMENT

Properties

$symbols

$symbols : \Automap\Build\array(array('type'

Type

\Automap\Build\array(array('type' — => <symbol type>,'name' => <case-sensitive symbol name>))

$exclude_list

$exclude_list : \Automap\Build\array(symbol

Type

\Automap\Build\array(symbol — keys) A list of symbols to exclude

Methods

__construct()

__construct() 

Constructor

parseExtension()

parseExtension(string  $file) : null

Extracts symbols from an extension

Parameters

string $file

Extension name

Throws

\Exception

if extension cannot be loaded

Returns

null

parseScriptFile()

parseScriptFile(string  $path) : array

Extracts symbols from a PHP script file

Parameters

string $path

FIle to parse

Throws

\Exception

on parse error

Returns

array —

of symbols

parseScript()

parseScript(string  $buf) : array

Extracts symbols from a PHP script contained in a string

Parameters

string $buf

The script to parse

Throws

\Exception

on parse error

Returns

array —

of symbols

cleanup()

cleanup() 

exclude()

exclude(string  $type, string  $name) : null

Mark a symbol as excluded

Parameters

string $type

one of the \Automap\Mgr::T_xx constants

string $name

The symbol name

Returns

null

addSymbol()

addSymbol(string  $type, string  $name) : null

Add a symbol into the table

Filter out the symbol from the exclude list

Parameters

string $type

one of the \Automap\Mgr::T_xx constants

string $name

The symbol name

Returns

null

combineNSSymbol()

combineNSSymbol(string  $ns, string  $symbol) : string

Combine a namespace with a symbol

The leading and trailing backslashes are first suppressed from the namespace. Then, if the namespace is not empty it is prepended to the symbol using a backslash.

Parameters

string $ns

Namespace (can be empty)

string $symbol

Symbol name (cannot be empty)

Returns

string —

Fully qualified name without leading backslash

parseAutomapDirectives()

parseAutomapDirectives(  $buf,   $skip_blocks) : boolean

Register explicit declarations

Format: :declare :ignore :ignore-file :skip-blocks

Parameters

$buf
$skip_blocks

Returns

boolean —

false if indexing is disabled on this file

parseTokens()

parseTokens(  $buf,   $skip_blocks) 

Extract symbols from script tokens

Parameters

$buf
$skip_blocks