Methods summary
public
|
#
__construct( array $options = array() )
Initializes class with passed options
Initializes class with passed options
Parameters
- $options
array $options Assoziative options array as follows: - excludeDirs: (array) List of
directories to exclude, optional. Default values are '.svn' and '.cvs'. -
excludeFiles: (array) List of files to exclude, optional. Default values are
'/^~*.\.php$/' and '/^~*.\.inc$/'. - extensionsToParse: (array) List of file
extensions to parse, optional. Default values are '.php' and '.inc'. -
enableDebug: (bool) Flag to enable debugging, optional. Default value is false.
|
public
|
#
setExcludeDirs( array $excludeDirs )
Sets directories to exclude
Sets directories to exclude
Parameters
- $excludeDirs
array $excludeDirs
|
public
array
|
#
getExcludeDirs( )
Returns list of directories to exclude
Returns list of directories to exclude
Returns
array
|
public
|
#
setExcludeFiles( array $excludeFiles )
Sets files to exclude
Parameters
- $excludeFiles
array $excludeFiles Feasible values are - temp.php (single file name) - ~*.php (with *
wildcard) Will be replaced against regex '/^~.*\.php$/'
|
public
array
|
#
getExcludeFiles( )
Returns list of files to exclude
Returns list of files to exclude
Returns
array
|
public
|
#
setExtensionsToParse( array $extensionsToParse )
Sets file extensions to parse
Sets file extensions to parse
Parameters
- $extensionsToParse
array $extensionsToParse
|
public
array
|
#
getExtensionsToParse( )
Returns list of file extension to parse
Returns list of file extension to parse
Returns
array
|
public
array|null
|
#
findInDir( SplFileInfo $fileInfo, boolean $recursive = true )
Detects all available class type tokens in found files inside passed
directory.
Detects all available class type tokens in found files inside passed
directory.
Parameters
- $fileInfo
SplFileInfo $fileInfo
- $recursive
boolean $recursive Flag to parse directory recursive
Returns
array|null Either a assoziative array where the key is the class type token and the value
is the path or NULL.
|
public
array|null
|
#
findInFile( SplFileInfo $fileInfo )
Detects all available class type tokens in passed file
Detects all available class type tokens in passed file
Parameters
- $fileInfo
SplFileInfo $fileInfo
Returns
array|null Either a assoziative array where the key is the class type token and the value
is the path or NULL.
|
public
array
|
#
getDebugMessages( )
Returns list of debug messages
Returns list of debug messages
Returns
array
|
public
string
|
#
getFormattedDebugMessages( string $delemiter = "\n", string $wrap = '%s' )
Returns debug messages in a formatted way.
Returns debug messages in a formatted way.
Parameters
- $delemiter
string $delemiter Delemiter between each message
- $wrap
string $wrap String with %s type specifier used to wrap all messages
Returns
string Formatted string
Throws
|
protected
|
#
_debug( string $msg )
Adds passed message to debug list, if debugging is enabled
Adds passed message to debug list, if debugging is enabled
Parameters
|
protected
RecursiveIteratorIterator|DirectoryIterator
|
#
_getDirIterator( SplFileInfo $fileInfo, boolean $recursive )
Returns directory iterator depending on $recursive parameter value
Returns directory iterator depending on $recursive parameter value
Parameters
- $fileInfo
SplFileInfo $file
- $recursive
boolean $recursive
Returns
RecursiveIteratorIterator|DirectoryIterator
|
protected
boolean
|
#
_isFileToProccess( SplFileInfo $file )
Checks if file is to proccess
Checks if file is to proccess
Parameters
Returns
boolean
|
protected
boolean
|
#
_isDirToExclude( SplFileInfo $file )
Checks if directory is to exclude
Checks if directory is to exclude
Parameters
Returns
boolean
|
protected
boolean
|
#
_isFileToExclude( SplFileInfo $file )
Checks if file is to exclude
Checks if file is to exclude
Parameters
Returns
boolean
|
protected
boolean
|
#
_isFileToParse( SplFileInfo $file )
Checks if file is to parse (if file extension matches)
Checks if file is to parse (if file extension matches)
Parameters
Returns
boolean
|
protected
string
|
#
_normalizePathSeparator( string $path )
Replaces windows style directory separator (backslash against slash)
Replaces windows style directory separator (backslash against slash)
Parameters
Returns
string
|
Properties summary
protected
array
|
$_excludeDirs
|
array('.svn', '.cvs') |
#
List of directories to ignore (note: is case insensitive)
List of directories to ignore (note: is case insensitive)
|
protected
array
|
$_excludeFiles
|
array('/^~*.\.php$/', '/^~*.\.inc$/') |
#
List of files to ignore, regex pattern is also accepted (note: is case
insensitive)
List of files to ignore, regex pattern is also accepted (note: is case
insensitive)
|
protected
array
|
$_extensionsToParse
|
array('.php', '.inc') |
#
List of file extensions to parse (note: is case insensitive)
List of file extensions to parse (note: is case insensitive)
|
protected
boolean
|
$_enableDebug
|
false |
#
Flag to enable debugging, all messages will be collected in property
_debugMessages, if enabled
Flag to enable debugging, all messages will be collected in property
_debugMessages, if enabled
|
protected
array
|
$_debugMessages
|
array() |
#
List of debugging messages, will e filled, if debugging is active
List of debugging messages, will e filled, if debugging is active
|