jAutoloader

package

jelix

subpackage

core

Methods

getPath

getPath( $className) : string

Arguments

$className

Response

string

the full path of the file declaring the given class

the method that should be called by the autoload system

loadClass( $className) 

Arguments

$className

register a simple class name associated to a file.

registerClass( $className,  $includeFile) 
parameter

string $className the class name. It can contain a namespace

string $includeFile the full path to the file we have to include

Arguments

$className

$includeFile

register a regular expression associated to a path. If the class name match the given regular expression, then it will load the file $includePath.'/'.$className.$extension

registerClassPattern( $regExp,  $includePath,  $extension = '.php') 

Arguments

$regExp

$includePath

$extension

registerIncludePath

registerIncludePath( $includePath,  $extension = '.php') 

Arguments

$includePath

$extension

register a namespace associated to a path. The full class path will be resolved following psr0 rules

registerNamespace( $namespace,  $includePath,  $extension = '.php') 

example: registerNamespace('foo\bar','/my/path', '.php') the resulting path for the class \foo\bar\baz\myclass is /my/path/foo/bar/baz/myclass.php

Arguments

$namespace

$includePath

$extension

register a namespace associated to a path. The full class path will be resolved as: - the part of the namespace of the class that match $namespace, is removed - the other part is then transformed following psr0 rules - the resulting path is then added to $includePath

registerNamespacePathMap( $namespace,  $includePath,  $extension = '.php') 

registerNamespacePathMap('foo\bar','/my/path', '.php'); the resulting path for the class \foo\bar\baz\myclass is /my/path/baz/myclass.php

Arguments

$namespace

$includePath

$extension

Properties

nsPaths

nsPaths : 

Type(s)

classPaths

classPaths : 

Type(s)

includePaths

includePaths : 

Type(s)

regClassPaths

regClassPaths : 

Type(s)