contenido\tools\mpAutoloaderClassMap\mpClassTypeFinder.php

Show: PublicProtectedPrivateinherited
Table of Contents
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 $  

\mpClassTypeFinder

Package: mpAutoloaderClassMap
Class to find class type tokens
Author
Murat Purc  
Category
Development  

Properties

>VPropertyprotectedarray $_debugMessages = array()
List of debugging messages, will e filled, if debugging is active
Default valuearray()Details
Type
array
>VPropertyprotectedbool $_enableDebug = false
Flag to enable debugging, all messages will be collected in property _debugMessages, if enabled
Default valuefalseDetails
Type
bool
>VPropertyprotectedarray $_excludeDirs = array('.svn', '.cvs')
List of directories to ignore (note: is case insensitive)
Default valuearray('.svn', '.cvs')Details
Type
array
>VPropertyprotectedarray $_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
>VPropertyprotectedarray $_extensionsToParse = array('.php', '.inc')
List of file extensions to parse (note: is case insensitive)
Default valuearray('.php', '.inc')Details
Type
array

Methods

methodpublic__construct(array $options = array()) : void

Initializes class with passed options

Parameters
NameTypeDescription
$optionsarray

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.

methodprotected_debug(string $msg) : void

Adds passed message to debug list, if debugging is enabled

Parameters
NameTypeDescription
$msgstring
methodprotected_getDirIterator( $fileInfo, bool $recursive) : \RecursiveIteratorIterator | \DirectoryIterator

Returns directory iterator depending on $recursive parameter value

Parameters
NameTypeDescription
$fileInfo
$recursivebool
Returns
TypeDescription
\RecursiveIteratorIterator | \DirectoryIterator
methodprotected_isDirToExclude(\SplFileInfo $file) : bool

Checks if directory is to exclude

Parameters
NameTypeDescription
$file\SplFileInfo
Returns
TypeDescription
bool
methodprotected_isFileToExclude(\SplFileInfo $file) : bool

Checks if file is to exclude

Parameters
NameTypeDescription
$file\SplFileInfo
Returns
TypeDescription
bool
methodprotected_isFileToParse(\SplFileInfo $file) : bool

Checks if file is to parse (if file extension matches)

Parameters
NameTypeDescription
$file\SplFileInfo
Returns
TypeDescription
bool
methodprotected_isFileToProccess(\SplFileInfo $file) : bool

Checks if file is to proccess

Parameters
NameTypeDescription
$file\SplFileInfo
Returns
TypeDescription
bool
methodprotected_normalizePathSeparator(string $path) : string

Replaces windows style directory separator (backslash against slash)

Parameters
NameTypeDescription
$pathstring
Returns
TypeDescription
string
methodpublicfindInDir(\SplFileInfo $fileInfo, bool $recursive = true) : array | null

Detects all available class type tokens in found files inside passed directory.

Parameters
NameTypeDescription
$fileInfo\SplFileInfo
$recursivebool

Flag to parse directory recursive

Returns
TypeDescription
array | nullEither a assoziative array where the key is the class type token and the value is the path or null.
methodpublicfindInFile(\SplFileInfo $fileInfo) : array | null

Detects all available class type tokens in passed file

Parameters
NameTypeDescription
$fileInfo\SplFileInfo
Returns
TypeDescription
array | nullEither a assoziative array where the key is the class type token and the value is the path or null.
methodpublicgetDebugMessages() : array

Returns list of debug messages

Returns
TypeDescription
array
methodpublicgetExcludeDirs() : array

Returns list of directories to exclude

Returns
TypeDescription
array
methodpublicgetExcludeFiles() : array

Returns list of files to exclude

Returns
TypeDescription
array
methodpublicgetExtensionsToParse() : array

Returns list of file extension to parse

Returns
TypeDescription
array
methodpublicgetFormattedDebugMessages(string $delemiter = "\n", string $wrap = '%s') : string

Returns debug messages in a formatted way.

Parameters
NameTypeDescription
$delemiterstring

Delemiter between each message

$wrapstring

String with %s type specifier used to wrap all messages

Returns
TypeDescription
stringFormatted string
Throws
ExceptionDescription
\cInvalidArgumentExceptionif the given wrap does not contain %s
methodpublicsetExcludeDirs(array $excludeDirs) : void

Sets directories to exclude

Parameters
NameTypeDescription
$excludeDirsarray
methodpublicsetExcludeFiles(array $excludeFiles) : void

Sets files to exclude

Parameters
NameTypeDescription
$excludeFilesarray

Feasible values are - temp.php (single file name) - ~.php (with * wildcard) Will be replaced against regex '/^~..php$/'

methodpublicsetExtensionsToParse(array $extensionsToParse) : void

Sets file extensions to parse

Parameters
NameTypeDescription
$extensionsToParsearray
Documentation was generated by phpDocumentor 2.0.0a12.