\Puyo\LoaderPsr4

PSR-4準拠のautoloader

1つの namespacePrefix - baseDir の対応とその登録/解除を行う

Summary

Methods
Properties
Constants
__construct()
setBaseDir()
getBaseDir()
setFileExtension()
getFileExtension()
register()
unregister()
loadClass()
No public properties found
NS_SEPARATOR
No protected methods found
No protected properties found
N/A
No private methods found
$nsPrefix
$baseDir
$fileExt
N/A

Constants

NS_SEPARATOR

NS_SEPARATOR

Properties

$nsPrefix

$nsPrefix : 

Type

$baseDir

$baseDir : 

Type

$fileExt

$fileExt : 

Type

Methods

__construct()

__construct(string  $nsPrefix = null, string  $baseDir = null, string  $fileExt = '.php') 

constructor

Parameters

string $nsPrefix

(optional)

string $baseDir

(optional)

string $fileExt

(optional) default='.php'

setBaseDir()

setBaseDir(string  $baseDir) 

Sets the base include path for all class files in the namespace of this class loader.

Parameters

string $baseDir

getBaseDir()

getBaseDir() : string

Gets the base include path for all class files in the namespace of this class loader.

Returns

string —

$baseDir

setFileExtension()

setFileExtension(string  $fileExt) 

Sets the file extension of class files in the namespace of this class loader.

Parameters

string $fileExt

getFileExtension()

getFileExtension() : string

Gets the file extension of class files in the namespace of this class loader.

Returns

string —

$fileExtension

register()

register() 

Installs this class loader on the SPL autoload stack.

unregister()

unregister() 

Uninstalls this class loader from the SPL autoloader stack.

loadClass()

loadClass(string  $className) : void

Loads the given class or interface.

Parameters

string $className

The name of the class to load.