|
static | discover ($classPrefix, $parentPath, $force=true, $recurse=false) |
|
static | getClassList () |
|
static | getDeprecatedAliases () |
|
static | getNamespaces ($type='psr0') |
|
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, $type='psr0') |
|
static | setup ($enablePsr=true, $enablePrefixes=true, $enableClasses=true) |
|
static | loadByPsr4 ($class) |
|
static | loadByPsr0 ($class) |
|
static | loadByAlias ($class) |
|
static | applyAliasFor ($class) |
|
static | _autoload ($class) |
|
◆ _autoload()
static _autoload |
( |
|
$class | ) |
|
|
static |
Autoload a class based on name.
- Paramètres
-
string | $class | The class to be loaded. |
- Renvoie
- boolean True if the class was loaded, false otherwise.
- Depuis
- 1.7.3
Références $class, et $prefix.
◆ _load()
static _load |
( |
|
$class, |
|
|
|
$lookup |
|
) |
| |
|
staticprivate |
Load a class based on name and lookup array.
- Paramètres
-
string | $class | The class to be loaded (without prefix). |
array | $lookup | The array of base paths to use for finding the class file. |
- Renvoie
- boolean True if the class was loaded, false otherwise.
- Depuis
- 3.0.0
Références $base, $class, $parts, et $path.
◆ applyAliasFor()
static applyAliasFor |
( |
|
$class | ) |
|
|
static |
Applies a class alias for an already loaded class, if a class alias was created for it.
- Paramètres
-
string | $class | We'll look for and register aliases for this (real) class name |
- Renvoie
- void
- Depuis
- 3.4
Références $class.
Référencé par JClassLoader\loadClass().
◆ discover()
static discover |
( |
|
$classPrefix, |
|
|
|
$parentPath, |
|
|
|
$force = true , |
|
|
|
$recurse = false |
|
) |
| |
|
static |
Method to discover classes of a given type in a given path.
- Paramètres
-
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. |
- Renvoie
- void
- Depuis
- 1.7.0
$file DirectoryIterator
Références $class, $classes, et $file.
◆ getClassList()
Method to get the list of registered classes and their respective file paths for the autoloader.
- Renvoie
- array The array of class => path values for the autoloader.
- Depuis
- 1.7.0
Références $classes.
◆ getDeprecatedAliases()
static getDeprecatedAliases |
( |
| ) |
|
|
static |
◆ getNamespaces()
static getNamespaces |
( |
|
$type = 'psr0' | ) |
|
|
static |
Method to get the list of registered namespaces.
- Paramètres
-
string | $type | Defines the type of namespace, can be prs0 or psr4. |
- Renvoie
- array The array of namespace => path values for the autoloader.
- Depuis
- 3.1.4
Références $type.
◆ import()
static import |
( |
|
$key, |
|
|
|
$base = null |
|
) |
| |
|
static |
Loads a class from specified directories.
- Paramètres
-
string | $key | The class name to look for (dot notation). |
string | $base | Search this directory for the class. |
- Renvoie
- boolean True on success.
- Depuis
- 1.7.0
Références $base, $class, $classes, $key, $parts, $path, et DIRECTORY_SEPARATOR.
Référencé par FOFIntegrationJoomlaFilesystem\__construct(), FOFTable\__construct(), CacheController\addIncludePath(), CacheStorage\addIncludePath(), Cache\addIncludePath(), JoomlaupdateControllerUpdate\captive(), JoomlaupdateModelDefault\captiveFileExists(), CacheliteStorage\clean(), JoomlaupdateModelDefault\downloadPackage(), FOFUtilsUpdate\findUpdatesJoomla(), FOFIntegrationJoomlaPlatform\getCacheObject(), CacheController\getInstance(), FOFModel\getPagination(), FileLayout\getPath(), FOFModel\getState(), Factory\getStream(), FOFIntegrationJoomlaPlatform\importPlugin(), jimport(), Toolbar\loadButtonType(), FOFIntegrationJoomlaPlatform\loginUser(), FOFIntegrationJoomlaPlatform\logoutUser(), FOFDispatcher\onBeforeDispatchCLI(), PlgTwofactorauthYubikey\onUserTwofactorShowConfiguration(), PlgTwofactorauthTotp\onUserTwofactorShowConfiguration(), JoomlaupdateModelDefault\removePackageFiles(), FOFUtilsInstallscript\uninstallObsoleteSubextensions(), FOFIntegrationJoomlaPlatform\URIbase(), et FOFIntegrationJoomlaPlatform\URIroot().
◆ load()
Load the file for a class.
- Paramètres
-
string | $class | The class to be loaded. |
- Renvoie
- boolean True on success
- Depuis
- 1.7.0
Références $class, $classes, et $key.
◆ loadAliasFor()
static loadAliasFor |
( |
|
$class | ) |
|
|
staticprivate |
Loads the aliases for the given class.
- Paramètres
-
- Renvoie
- void
- Depuis
- 3.8.0
Références $class.
◆ loadByAlias()
static loadByAlias |
( |
|
$class | ) |
|
|
static |
Method to autoload classes that have been aliased using the registerAlias method.
- Paramètres
-
string | $class | The fully qualified class name to autoload. |
- Renvoie
- boolean True on success, false otherwise.
- Depuis
- 3.2
Références $class.
◆ loadByPsr0()
static loadByPsr0 |
( |
|
$class | ) |
|
|
static |
Method to autoload classes that are namespaced to the PSR-0 standard.
- Paramètres
-
string | $class | The fully qualified class name to autoload. |
- Renvoie
- boolean True on success, false otherwise.
- Depuis
- 3.2.0
- Obsolète:
- 4.0 this method will be removed
Références $class, $className, $path, DIRECTORY_SEPARATOR, et null.
◆ loadByPsr4()
static loadByPsr4 |
( |
|
$class | ) |
|
|
static |
Method to autoload classes that are namespaced to the PSR-4 standard.
- Paramètres
-
string | $class | The fully qualified class name to autoload. |
- Renvoie
- boolean True on success, false otherwise.
- Depuis
- 3.7.0
Références $class, $className, $path, DIRECTORY_SEPARATOR, et null.
◆ register()
static register |
( |
|
$class, |
|
|
|
$path, |
|
|
|
$force = true |
|
) |
| |
|
static |
Directly register a class to the autoload list.
- Paramètres
-
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. |
- Renvoie
- void
- Depuis
- 1.7.0
Références $class, $classes, et $path.
Référencé par HTMLHelper\_(), UsersRouter\__construct(), ContactRouter\__construct(), ContentRouter\__construct(), NewsfeedsRouter\__construct(), UsersModelProfile\__construct(), JApplication\_createConfiguration(), CategoriesHelper\addSubmenu(), TagsHelper\addSubmenu(), LanguagesViewLanguage\addToolbar(), BannersViewBanners\addToolbar(), CategoriesViewCategory\addToolbar(), CategoriesViewCategories\addToolbar(), ContentModelArticle\batchMove(), ContentModelArticle\cleanupPostBatchCopy(), TagsModelTags\countItems(), CategoriesModelCategories\countItems(), LegacyFactory\createView(), LanguagesViewMultilangstatus\display(), InstallerController\display(), MenusController\display(), ModulesController\display(), MessagesController\display(), NewsfeedsController\display(), PluginsController\display(), CacheController\display(), SearchViewSearch\display(), LanguagesController\display(), SearchController\display(), RedirectController\display(), FinderController\display(), ContactController\display(), PrivacyController\display(), CategoriesController\display(), DeletefilesCli\doExecute(), JHtmlIcon\email(), ConfigControllerTemplatesSave\execute(), ConfigControllerTemplatesDisplay\execute(), ConfigControllerModulesSave\execute(), ConfigControllerModulesDisplay\execute(), ConfigControllerModulesCancel\execute(), FieldsHelper\extract(), CliApplication\fetchConfigurationData(), WebApplication\fetchConfigurationData(), JoomlaupdateModelDefault\finaliseUpgrade(), Installer\getAdapters(), JFormFieldConsentBox\getAssignedArticleUrl(), CategoriesModelCategories\getAssoc(), CategoriesModelCategory\getAssoc(), ActionlogsHelper\getContentTypeLink(), ActionlogsHelper\getCsvData(), FinderIndexerParser\getInstance(), FinderIndexerStemmer\getInstance(), Pathway\getInstance(), CacheController\getInstance(), AbstractMenu\getInstance(), Categories\getInstance(), FinderIndexer\getInstance(), Router\getInstance(), Document\getInstance(), TagsHelperRoute\getItemRoute(), SearchModelSearches\getItems(), JFormFieldTos\getLabel(), JFormFieldprivacy\getLayoutData(), JFormFieldterms\getLayoutData(), ModLanguagesHelper\getList(), ModLatestActionsHelper\getList(), JFormFieldFieldcontexts\getOptions(), FinderCli\index(), PlgFinderCategories\index(), Installer\loadAdapter(), Document\loadRenderer(), PlgSystemLanguageFilter\onAfterDispatch(), PlgSampledataBlog\onAjaxSampledataApplyStep2(), PlgContentFields\onContentPrepare(), PlgContentContact\onContentPrepare(), PlgSearchContent\onContentSearch(), PlgSearchTags\onContentSearch(), PlgSearchContacts\onContentSearch(), PlgButtonFields\onDisplay(), PlgUserTerms\onUserAfterSave(), JHtmlModules\positions(), CategoriesModelCategory\preprocessForm(), LanguagesModelStrings\refresh(), PlgSystemActionLogs\renderActionlogsExtensions(), LanguagesControllerOverride\save(), NewsfeedsModelNewsfeed\save(), ContactModelContact\save(), ContentModelArticle\save(), LanguageHelper\saveToIniFile(), InstallationControllerRemovefolder\sendJsonResponse(), Adapter\setAdapter(), PlgFinderTags\setup(), PlgFinderNewsfeeds\setup(), PlgFinderContent\setup(), PlgFinderCategories\setup(), PlgFinderContacts\setup(), InstallerAdapter\setupScriptfile(), FileAdapter\uninstall(), PluginAdapter\uninstall(), PackageAdapter\uninstall(), TemplatesModelTemplate\uploadFile(), et ModulesModelModule\validate().
◆ registerAlias()
static registerAlias |
( |
|
$alias, |
|
|
|
$original, |
|
|
|
$version = false |
|
) |
| |
|
static |
Offers the ability for "just in time" usage of class_alias()
. You cannot overwrite an existing alias.
- Paramètres
-
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. |
- Renvoie
- boolean True if registration was successful. False if the alias already exists.
- Depuis
- 3.2
Références $version.
◆ registerNamespace()
static registerNamespace |
( |
|
$namespace, |
|
|
|
$path, |
|
|
|
$reset = false , |
|
|
|
$prepend = false , |
|
|
|
$type = 'psr0' |
|
) |
| |
|
static |
Register a namespace to the autoloader. When loaded, namespace paths are searched in a "last in, first out" order.
- Paramètres
-
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. |
string | $type | Defines the type of namespace, can be prs0 or psr4. |
- Renvoie
- void
- Exceptions
-
- Note
- The default argument of $type will be changed in J4 to be 'psr4'
- Depuis
- 3.1.4
Références $path, $type, et JPATH_ROOT.
◆ registerPrefix()
static registerPrefix |
( |
|
$prefix, |
|
|
|
$path, |
|
|
|
$reset = false , |
|
|
|
$prepend = false |
|
) |
| |
|
static |
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.
- Paramètres
-
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. |
- Renvoie
- void
- Exceptions
-
- Depuis
- 3.0.0
Références $path, $prefix, et JPATH_ROOT.
Référencé par InstallationModelLanguages\addMenuGroup(), ConfigControllerConfigDisplay\execute(), et ConfigControllerConfigSave\execute().
◆ setup()
static setup |
( |
|
$enablePsr = true , |
|
|
|
$enablePrefixes = true , |
|
|
|
$enableClasses = true |
|
) |
| |
|
static |
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.
- Paramètres
-
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). |
- Renvoie
- void
- Depuis
- 3.1.4
◆ stripFirstBackslash()
static stripFirstBackslash |
( |
|
$class | ) |
|
|
staticprivate |
Strips the first backslash from the given class if present.
- Paramètres
-
string | $class | The class to strip the first prefix from. |
- Renvoie
- string The striped class name.
- Depuis
- 3.8.0
Références $class.
◆ $classAliases
◆ $classAliasesInverse
$classAliasesInverse = array() |
|
staticprotected |
◆ $classes
◆ $deprecatedAliases
$deprecatedAliases = array() |
|
staticprotected |
◆ $imported
◆ $namespaces
$namespaces = array('psr0' => array(), 'psr4' => array()) |
|
staticprotected |
◆ $prefixes
La documentation de cette classe a été générée à partir du fichier suivant :