Joomla CMS
4.2.2
Documentation des API du CMS Joomla en version 4.2.2
|
Fonctions membres publiques statiques | |
static | discover ($classPrefix, $parentPath, $force=true, $recurse=false) |
static | getClassList () |
static | getDeprecatedAliases () |
static | getNamespaces () |
static | import ($key, $base=null) |
static | load ($class) |
static | register ($class, $path, $force=true) |
static | registerPrefix ($prefix, $path, $reset=false, $prepend=false) |
static | registerAlias ($alias, $original, $version=false) |
static | registerNamespace ($namespace, $path, $reset=false, $prepend=false) |
static | setup ($enablePsr=true, $enablePrefixes=true, $enableClasses=true) |
static | loadByPsr4 ($class) |
static | loadByPsr ($class) |
static | loadByAlias ($class) |
static | applyAliasFor ($class) |
static | _autoload ($class) |
Attributs protégés statiques | |
static | $classes = array() |
static | $imported = array() |
static | $prefixes = array() |
static | $classAliases = array() |
static | $classAliasesInverse = array() |
static | $namespaces = array() |
static | $deprecatedAliases = array() |
static | $extensionRootFolders = array() |
Fonctions membres privées statiques | |
static | _load ($class, $lookup) |
static | loadAliasFor ($class) |
static | stripFirstBackslash ($class) |
Static class to handle loading of libraries.
|
static |
|
staticprivate |
|
static |
Applies a class alias for an already loaded class, if a class alias was created for it.
string | $class | We'll look for and register aliases for this (real) class name |
Références $class.
Référencé par ClassLoader\loadClass().
Method to discover classes of a given type in a given path.
string | $classPrefix | The class name prefix to use for discovery. |
string | $parentPath | Full path to the parent folder for the classes to discover. |
boolean | $force | True to overwrite the autoload path value for the class if it already exists. |
boolean | $recurse | Recurse through all child directories as well as the parent path. |
$file DirectoryIterator
|
static |
Method to get the list of registered classes and their respective file paths for the autoloader.
Références $classes.
|
static |
Method to get the list of deprecated class aliases.
|
static |
Method to get the list of registered namespaces.
|
static |
Loads a class from specified directories.
string | $key | The class name to look for (dot notation). |
string | $base | Search this directory for the class. |
If we are not importing a library from the Joomla namespace directly include the file since we cannot assert the file/folder naming conventions.
Références $base, $class, $classes, $key, $parts, $path, et __DIR__.
Référencé par jimport().
|
static |
|
staticprivate |
Loads the aliases for the given class.
string | $class | The class. |
Références $class.
|
static |
Method to autoload classes that have been aliased using the registerAlias method.
string | $class | The fully qualified class name to autoload. |
Références $class.
|
static |
Method to autoload classes that are namespaced to the PSR-4 standard.
string | $class | The fully qualified class name to autoload. |
Références $class, $className, $path, et null.
|
static |
Method to autoload classes that are namespaced to the PSR-4 standard.
string | $class | The fully qualified class name to autoload. |
Références $class.
|
static |
Directly register a class to the autoload list.
string | $class | The class name to register. |
string | $path | Full path to the file that holds the class to register. |
boolean | $force | True to overwrite the autoload path value for the class if it already exists. |
Références $class, $classes, et $path.
Référencé par HTMLHelper\_(), LegacyFactory\createView(), RemoveOldFilesCommand\doExecute(), UpdateModel\finaliseUpgrade(), Installer\getAdapters(), CategoriesModel\getAssoc(), CategoryModel\getAssoc(), ActionlogsHelper\getContentTypeLink(), CacheController\getInstance(), RouteHelper\getItemRoute(), LanguagesHelper\getList(), PlgFinderCategories\index(), ListView\initializeView(), LegacyComponent\loadHelper(), PlgSystemLanguageFilter\onAfterDispatch(), CategoryModel\preprocessForm(), Config\register(), PlgSystemActionLogs\renderActionlogsExtensions(), Adapter\setAdapter(), et InstallerAdapter\setupScriptfile().
|
static |
Offers the ability for "just in time" usage of class_alias()
. You cannot overwrite an existing alias.
string | $alias | The alias name to register. |
string | $original | The original class to alias. |
string | boolean | $version | The version in which the alias will no longer be present. |
Références $version.
Register a namespace to the autoloader. When loaded, namespace paths are searched in a "last in, first out" order.
string | $namespace | A case sensitive Namespace to register. |
string | $path | A case sensitive absolute file path to the library root where classes of the given namespace can be found. |
boolean | $reset | True to reset the namespace with only the given lookup path. |
boolean | $prepend | If true, push the path to the beginning of the namespace lookup paths array. |
RuntimeException |
Références $namespace, $path, et JPATH_ROOT.
Register a class prefix with lookup path. This will allow developers to register library packages with different class prefixes to the system autoloader. More than one lookup path may be registered for the same class prefix, but if this method is called with the reset flag set to true then any registered lookups for the given prefix will be overwritten with the current lookup path. When loaded, prefix paths are searched in a "last in, first out" order.
string | $prefix | The class prefix to register. |
string | $path | Absolute file path to the library root where classes with the given prefix can be found. |
boolean | $reset | True to reset the prefix with only the given lookup path. |
boolean | $prepend | If true, push the path to the beginning of the prefix lookup paths array. |
RuntimeException |
Références $path, $prefix, et JPATH_ROOT.
Method to setup the autoloaders for the Joomla Platform. Since the SPL autoloaders are called in a queue we will add our explicit class-registration based loader first, then fall back on the autoloader based on conventions. This will allow people to register a class in a specific location and override platform libraries as was previously possible.
boolean | $enablePsr | True to enable autoloading based on PSR-0. |
boolean | $enablePrefixes | True to enable prefix based class loading (needed to auto load the Joomla core). |
boolean | $enableClasses | True to enable class map based class loading (needed to auto load the Joomla core). |
|
staticprivate |
Strips the first backslash from the given class if present.
string | $class | The class to strip the first prefix from. |
Références $class.
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |