PHP Class Nette\Loaders\RobotLoader

Author: David Grudl
Inheritance: extends Nette\Loaders\AutoLoader
Mostrar archivo Open project: nette/robot-loader Class Usage Examples

Public Properties

Property Type Description
$acceptFiles comma separated wildcards
$autoRebuild boolean @deprecated
$ignoreDirs comma separated wildcards

Public Methods

Method Description
__construct ( )
addDirectory ( $path ) : self Add path or paths to list.
getCacheStorage ( )
getIndexedClasses ( ) : array
rebuild ( ) : void Rebuilds class list cache.
register ( $prepend = FALSE ) : self Register autoloader.
setAutoRefresh ( $on = TRUE ) : self Sets auto-refresh mode.
setCacheStorage ( Nette\Caching\IStorage $storage )
setTempDirectory ( $path ) : self Sets path to temporary directory.
tryLoad ( $type ) : void Handles autoloading of classes, interfaces or traits.

Protected Methods

Method Description
getCacheKey ( ) : array

Private Methods

Method Description
createFileIterator ( $dir ) : Iterator Creates an iterator scaning directory for PHP files, subdirectories and 'netterobots.txt' files.
getCacheFile ( ) : string
loadCache ( ) : void Loads class list from cache.
refresh ( ) : void Refreshes class list.
saveCache ( ) : void Writes class list to cache.
scanPhp ( $code ) : array Searches classes, interfaces and traits in PHP file.
updateFile ( $file ) : void

Method Details

__construct() public method

public __construct ( )

addDirectory() public method

Add path or paths to list.
public addDirectory ( $path ) : self
return self

getCacheKey() protected method

protected getCacheKey ( ) : array
return array

getCacheStorage() public method

Deprecation:
public getCacheStorage ( )

getIndexedClasses() public method

public getIndexedClasses ( ) : array
return array of class => filename

rebuild() public method

Rebuilds class list cache.
public rebuild ( ) : void
return void

register() public method

Register autoloader.
public register ( $prepend = FALSE ) : self
return self

setAutoRefresh() public method

Sets auto-refresh mode.
public setAutoRefresh ( $on = TRUE ) : self
return self

setCacheStorage() public method

Deprecation:
public setCacheStorage ( Nette\Caching\IStorage $storage )
$storage Nette\Caching\IStorage

setTempDirectory() public method

Sets path to temporary directory.
public setTempDirectory ( $path ) : self
return self

tryLoad() public method

Handles autoloading of classes, interfaces or traits.
public tryLoad ( $type ) : void
return void

Property Details

$acceptFiles public_oe property

comma separated wildcards
public $acceptFiles

$autoRebuild public_oe property

@deprecated
public bool $autoRebuild
return boolean

$ignoreDirs public_oe property

comma separated wildcards
public $ignoreDirs