contenido\tools\mpAutoloaderClassMap\mpClassTypeFinder.php
Contains class type token finder.
- Author
- Murat Purc
- Category
- Development
- Copyright
- Copyright (c) 2009-2010 Murat Purc (http://www.purc.de)
- License
- - GNU General Public License, version 2
- Package
- mpAutoloaderClassMap
- Version
- $Id: mpClassTypeFinder.php 3442 2012-10-11 22:33:10Z xmurrix $
Package: mpAutoloaderClassMapClass to find class type tokens
- Author
- Murat Purc
- Category
- Development
Properties



array $_debugMessages = array()
List of debugging messages, will e filled, if debugging is active
Default valuearray()
Details- Type
- array



bool $_enableDebug = false
Flag to enable debugging, all messages will be collected in property _debugMessages,
if enabled
Default valuefalse
Details- Type
- bool



array $_excludeDirs = array('.svn', '.cvs')
List of directories to ignore (note: is case insensitive)
Default valuearray('.svn', '.cvs')
Details- Type
- array



array $_excludeFiles = array('/^~*.\.php$/', '/^~*.\.inc$/')
List of files to ignore, regex pattern is also accepted (note: is case insensitive)
Default valuearray('/^~*.\.php$/', '/^~*.\.inc$/')
Details- Type
- array



array $_extensionsToParse = array('.php', '.inc')
List of file extensions to parse (note: is case insensitive)
Default valuearray('.php', '.inc')
Details- Type
- array
Methods



__construct(array $options = array()) : void
Initializes class with passed options
ParametersName | Type | Description |
---|
$options | array | 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.
|
---|



_debug(string $msg) : void
Adds passed message to debug list, if debugging is enabled
ParametersName | Type | Description |
---|
$msg | string | |
---|



_normalizePathSeparator(string $path) : string
Replaces windows style directory separator (backslash against slash)
ParametersName | Type | Description |
---|
$path | string | |
---|
Returns 


findInDir(\SplFileInfo $fileInfo, bool $recursive = true) : array | null
Detects all available class type tokens in found files inside passed directory.
ParametersName | Type | Description |
---|
$fileInfo | \SplFileInfo | |
---|
$recursive | bool | Flag to parse directory recursive |
---|
ReturnsType | Description |
---|
array | null | Either a assoziative array where the key is the class
type token and the value is the path or null. |



findInFile(\SplFileInfo $fileInfo) : array | null
Detects all available class type tokens in passed file
ParametersReturnsType | Description |
---|
array | null | Either a assoziative array where the key is the class
type token and the value is the path or null. |



getFormattedDebugMessages(string $delemiter = "\n", string $wrap = '%s') : string
Returns debug messages in a formatted way.
ParametersName | Type | Description |
---|
$delemiter | string | Delemiter between each message |
---|
$wrap | string | String with %s type specifier used to wrap all
messages
|
---|
ReturnsType | Description |
---|
string | Formatted string |
ThrowsException | Description |
---|
\cInvalidArgumentException | if the given wrap does not contain %s |



setExcludeDirs(array $excludeDirs) : void
Sets directories to exclude
ParametersName | Type | Description |
---|
$excludeDirs | array | |
---|



setExcludeFiles(array $excludeFiles) : void
ParametersName | Type | Description |
---|
$excludeFiles | array | Feasible values are
- temp.php (single file name)
- ~.php (with * wildcard)
Will be replaced against regex '/^~..php$/'
|
---|



setExtensionsToParse(array $extensionsToParse) : void
Sets file extensions to parse
ParametersName | Type | Description |
---|
$extensionsToParse | array | |
---|