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 = falseFlag to enable debugging, all messages will be collected in property _debugMessages,
if enabled
Default valuefalseDetails- 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()) : voidInitializes class with passed options
Parameters| Name | 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) : voidAdds passed message to debug list, if debugging is enabled
Parameters| Name | Type | Description |
|---|
| $msg | string | |
|---|



_normalizePathSeparator(string $path) : stringReplaces windows style directory separator (backslash against slash)
Parameters| Name | Type | Description |
|---|
| $path | string | |
|---|
Returns 


findInDir(\SplFileInfo $fileInfo, bool $recursive = true) : array | nullDetects all available class type tokens in found files inside passed directory.
Parameters| Name | Type | Description |
|---|
| $fileInfo | \SplFileInfo | |
|---|
| $recursive | bool | Flag to parse directory recursive |
|---|
Returns| Type | 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 | nullDetects all available class type tokens in passed file
ParametersReturns| Type | 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') : stringReturns debug messages in a formatted way.
Parameters| Name | Type | Description |
|---|
| $delemiter | string | Delemiter between each message |
|---|
| $wrap | string | String with %s type specifier used to wrap all
messages
|
|---|
Returns| Type | Description |
|---|
| string | Formatted string |
Throws| Exception | Description |
|---|
| \cInvalidArgumentException | if the given wrap does not contain %s |



setExcludeDirs(array $excludeDirs) : voidSets directories to exclude
Parameters| Name | Type | Description |
|---|
| $excludeDirs | array | |
|---|



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



setExtensionsToParse(array $extensionsToParse) : voidSets file extensions to parse
Parameters| Name | Type | Description |
|---|
| $extensionsToParse | array | |
|---|