SALT main class
package | salt |
---|
addClassFolder(string $folder, string $namespace= NULL
, string $pattern= '.class.php'
, array<mixed,string> $excludes= NULL
)
string
root 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
string
a folder, with or without trailing directory $separator
string
relative folder, with / separator
string
folder separator for $origin, default to /
string
the 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
string
Origin path
string
Destination 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 |
---|
string
Relative 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>
string
the path to find classes
array<mixed,string>
classes as (className => path)loadClass(string $className) : boolean
string
Class name with namespace to load
boolean
TRUE if class found, FALSE otherwiserelativePath(integer $destIgnoreLevel = 0
) : string
integer
(Optionnel, 0) Ignore some folders at the end of the method caller
string
Relative path between executed PHP script and method callersaltPath() : string
string
absolute SALT pathwebRelativePath(integer $destIgnoreLevel = 0
) : string
integer
(Optionnel, 0) Ignore some folders at the end of the method caller
string
Relative 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>
string
Folder 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()