SALT main class
| package | salt |
|---|
addClassFolder(string $folder, string $namespace= NULL, string $pattern= '.class.php', array<mixed,string> $excludes= NULL)
stringroot folder that contain classes
string(Optional, NULL) Namespace to use for register classes
string(Optional, .class.php) Suffix of files that contains classes
array<mixed,string>(Optional, NULL) List of folders or files to exclude. Can be a part of a folder/file
computePath(string $origin, string $relative, string $separator = '/') : string
stringa folder, with or without trailing directory $separator
stringrelative folder, with / separator
stringfolder separator for $origin, default to /
stringthe resolved path, always end with $separatorcomputeRelativePath(string $from, string $dest, integer $destIgnoreLevel = 0) : string
Parameters can be provided with a file or ends with / (or )
All characters after the last / (or ) is ignored
stringOrigin path
stringDestination path
integer(Optional, 0) Ignore some folders at the end of the destination path
\salt\SaltException |
If the origin and destination paths are not both relative or absolute path |
|---|
stringRelative path for go to $dest from $from. Return always ends with /config(array<mixed,string> $locales = NULL)
array<mixed,string>Locales to try to initialize. First available locale is used.
getClassesByPath(string $path) : array<mixed,string>
stringthe path to find classes
array<mixed,string>classes as (className => path)loadClass(string $className) : boolean
stringClass name with namespace to load
booleanTRUE if class found, FALSE otherwiserelativePath(integer $destIgnoreLevel = 0) : string
integer(Optionnel, 0) Ignore some folders at the end of the method caller
stringRelative path between executed PHP script and method callersaltPath() : string
stringabsolute SALT pathwebRelativePath(integer $destIgnoreLevel = 0) : string
integer(Optionnel, 0) Ignore some folders at the end of the method caller
stringRelative path between requested URI and method caller (usefull for URI rewrite)findAllClasses(string $folder, string $namespace= NULL, string $pattern= '.class.php', array<mixed,string> $excludes= NULL) : array<mixed,string>
stringFolder to inspect
string(Optional, NULL) Namespace to use
string(Optional, .class.php) Suffix to use for filter files
array<mixed,string>(Optional, NULL) List of folders or files to exclude. Can be a part of a folder/file
array<mixed,string>List or found files as ( Namespace\ClassName => FilePath )firstCallerFile(integer $ignoreCallers = 0) : array<mixed,string>
initI18n(array<mixed,string> $locales)
array<mixed,string>Locales to try to initialize. First available locale is used.
$ALL_CLASSES : array<mixed,string>
array()