Joomla CMS
4.2.2
Documentation des API du CMS Joomla en version 4.2.2
|
Fonctions membres publiques statiques | |
static | getInstance ($name=null, $prefix='\JApplication', Container $container=null) |
static | getRouter ($name=null, array $options=array()) |
Fonctions membres publiques statiques hérités de WebApplication | |
static | getInstance ($name=null) |
Fonctions membres publiques statiques hérités de AbstractWebApplication | |
static | isAscii ($str) |
Champs de données | |
$scope = null | |
Champs de données hérités de AbstractWebApplication | |
$charSet = 'utf-8' | |
$mimeType = 'text/html' | |
$httpVersion = '1.1' | |
$modifiedDate | |
$client | |
Champs de données hérités de CMSApplicationInterface | |
const | MSG_EMERGENCY = 'emergency' |
const | MSG_ALERT = 'alert' |
const | MSG_CRITICAL = 'critical' |
const | MSG_ERROR = 'error' |
const | MSG_WARNING = 'warning' |
const | MSG_NOTICE = 'notice' |
const | MSG_INFO = 'info' |
const | MSG_DEBUG = 'debug' |
Fonctions membres protégées | |
checkUserRequireReset ($option, $view, $layout, $tasks) | |
initialiseApp ($options=array()) | |
loadLibraryLanguage () | |
render () | |
route () | |
isTwoFactorAuthenticationRequired () | |
Fonctions membres protégées hérités de WebApplication | |
render () | |
loadSystemUris ($requestUri=null) | |
Fonctions membres protégées hérités de AbstractWebApplication | |
compress () | |
respond () | |
getHttpStatusValue ($value) | |
checkConnectionAlive () | |
checkHeadersSent () | |
detectRequestUri () | |
header ($string, $replace=true, $code=null) | |
isRedirectState ($state) | |
loadSystemUris ($requestUri=null) | |
Fonctions membres protégées hérités de AbstractApplication | |
dispatchEvent (string $eventName, ?EventInterface $event=null) | |
doExecute () | |
initialise () | |
Attributs protégés | |
$docOptions = array() | |
$clientId = null | |
$messageQueue = array() | |
$name = null | |
$profiler = null | |
$template = null | |
$pathway = null | |
$authenticationPluginType = 'authentication' | |
$menus = [] | |
Attributs protégés hérités de WebApplication | |
$document | |
$language | |
Attributs protégés hérités de AbstractWebApplication | |
$input | |
$response | |
Attributs protégés hérités de AbstractApplication | |
$config | |
Attributs protégés statiques | |
static | $instances = array() |
Attributs protégés statiques hérités de WebApplication | |
static | $instance |
Fonctions membres privées | |
sanityCheckSystemVariables () | |
hasUserConfiguredTwoFactorAuthentication () | |
setupLogging () | |
Attributs privés | |
$menuFactory | |
Joomla! CMS Application class
__construct | ( | Input | $input = null , |
Registry | $config = null , |
||
WebClient | $client = null , |
||
Container | $container = null |
||
) |
Class constructor.
Input | $input | An optional argument to provide dependency injection for the application's input object. If the argument is a JInput object that object will become the application's input object, otherwise a default input object is created. |
Registry | $config | An optional argument to provide dependency injection for the application's config object. If the argument is a Registry object that object will become the application's config object, otherwise a default config object is created. |
WebClient | $client | An optional argument to provide dependency injection for the application's client object. If the argument is a WebClient object that object will become the application's client object, otherwise a default client object is created. |
Container | $container | Dependency injection container. |
Références $client, $config, $container, $input, Symfony\Contracts\Service\__construct(), Profiler\getInstance(), JDEBUG, null, et Joomla\DI\setContainer().
checkSession | ( | ) |
Checks the user session.
If the session record doesn't exist, initialise it. If session is new, create session variables
Références class, Joomla\DI\getContainer(), Joomla\CMS\Application\getIdentity(), et Joomla\Application\getSession().
|
protected |
Check if the user is required to reset their password.
If the user is required to reset their password will be redirected to the page that manage the password reset.
string | $option | The option that manage the password reset |
string | $view | The view that manage the password reset |
string | $layout | The layout of the view that manage the password reset |
string | $tasks | Permitted tasks |
Références $layout, $name, $option, $task, $url, $user, $view, Text\_(), Route\_(), Factory\getApplication(), et Factory\getUser().
enqueueMessage | ( | $msg, | |
$type = self::MSG_INFO |
|||
) |
Enqueue a system message.
string | $msg | The message to enqueue. |
string | $type | The message type. Default is message. |
Implémente CMSApplicationInterface.
Références $message, $messages, $type, InputFilter\getInstance(), null, InputFilter\ONLY_BLOCK_DEFINED_ATTRIBUTES, et InputFilter\ONLY_BLOCK_DEFINED_TAGS.
getCfg | ( | $varname, | |
$default = null |
|||
) |
Gets a configuration value.
string | $varname | The name of the value to get. |
string | $default | Default value to return |
Références $default, Log\add(), et Log\WARNING.
getClientId | ( | ) |
Gets the client id of the current running application.
Références $clientId.
Returns a reference to the global CmsApplication object, only creating it if it doesn't already exist.
This method must be invoked as: $web = CmsApplication::getInstance();
string | $name | The name (optional) of the CmsApplication class to instantiate. |
string | $prefix | The class name prefix of the object. |
Container | $container | An optional dependency injection container to inject into the application. |
Références $container, $name, $prefix, elseif, Factory\getContainer(), Factory\getUser(), null, et Text\sprintf().
getMenu | ( | $name = null , |
|
$options = array() |
|||
) |
Returns the application object.
string | $name | The name of the application/client. |
array | $options | An optional associative array of configuration settings. |
Implémente CMSWebApplicationInterface.
Références AbstractMenu\$instances, $name, $options, $this, class, Joomla\DI\getContainer(), et null.
getMessageQueue | ( | $clear = false | ) |
Get the system message queue.
boolean | $clear | Clear the messages currently attached to the application object |
Références Joomla\Application\getSession().
getName | ( | ) |
Gets the name of the current running application.
Implémente CMSApplicationInterface.
Références $name.
getPathway | ( | ) |
Returns the application Pathway object.
Références Joomla\DI\getContainer(), Symfony\Contracts\Service\has(), et Text\sprintf().
|
static |
Returns the application Router object.
string | $name | The name of the application. |
array | $options | An optional associative array of configuration settings. |
Implémente CMSWebApplicationInterface.
Références $app, $name, $options, Factory\getApplication(), et Router\getInstance().
getTemplate | ( | $params = false | ) |
getUserState | ( | $key, | |
$default = null |
|||
) |
Gets a user state.
string | $key | The path of the state. |
mixed | $default | Optional default value, returned if the internal value is null. |
Implémente CMSWebApplicationInterface.
Références $default, $key, Joomla\Application\getSession(), et null.
getUserStateFromRequest | ( | $key, | |
$request, | |||
$default = null , |
|||
$type = 'none' |
|||
) |
Gets the value of a user state variable.
string | $key | The key of the user state variable. |
string | $request | The name of the variable passed in a request. |
string | $default | The default value for the variable if not found. Optional. |
string | $type | Filter for the variable, for valid values see InputFilter::clean(). Optional. |
Implémente CMSWebApplicationInterface.
|
private |
No longer used
|
protected |
Initialise the application.
array | $options | An optional associative array of configuration settings. |
Références $editor, $lang, Factory\$language, $options, $user, Language\getInstance(), Factory\getUser(), PluginHelper\importPlugin(), PluginHelper\isEnabled(), et Joomla\CMS\Application\triggerEvent().
isCli | ( | ) |
isClient | ( | $identifier | ) |
Check the client interface by name.
string | $identifier | String identifier for the application interface |
Implémente CMSApplicationInterface.
isHttpsForced | ( | $clientId = null | ) |
|
protected |
No longer used
|
protected |
Load the library language files for the application
Références JPATH_ADMINISTRATOR.
login | ( | $credentials, | |
$options = array() |
|||
) |
Login authentication function.
Username and encoded password are passed the onUserLogin event which is responsible for the user validation. A successful validation updates the current session record with the user's details.
Username and encoded password are sent as credentials (along with other possibilities) to each observer (authentication plugin) for user validation. Successful validation will update the current session with the user details.
array | $credentials | Array('username' => string, 'password' => string) |
array | $options | Array('remember' => boolean) |
Références $options, $results, $user, Text\_(), Factory\getApplication(), Authentication\getInstance(), Joomla\CMS\Application\getLogger(), Factory\getUser(), PluginHelper\importPlugin(), Authentication\STATUS_DENIED, Authentication\STATUS_EXPIRED, Authentication\STATUS_SUCCESS, et Joomla\CMS\Application\triggerEvent().
logout | ( | $userid = null , |
|
$options = array() |
|||
) |
Logout authentication function.
Passed the current user information to the onUserLogout event and reverts the current session record back to 'anonymous' parameters. If any of the authentication plugins did not successfully complete the logout routine then the whole method fails. Any errors raised should be done in the plugin as this provides the ability to give much more information about why the routine may have failed.
integer | $userid | The user to load - Can be an integer or string - If string, it is converted to ID automatically |
array | $options | Array('clientid' => array of client id's) |
Références $options, $parameters, $results, $user, Factory\getUser(), PluginHelper\importPlugin(), et Joomla\CMS\Application\triggerEvent().
redirect | ( | $url, | |
$status = 303 |
|||
) |
Redirect to another URL.
If the headers have not been sent the redirect will be accomplished using a "301 Moved Permanently" or "303 See Other" code in the header pointing to the new location. If the headers have already been sent this will be accomplished using a JavaScript statement.
string | $url | The URL to redirect to. Can only be http/https URL |
integer | $status | The HTTP 1.1 status code to be provided. 303 is assumed by default. |
Implémente WebApplicationInterface.
Références $url, et Joomla\Application\getSession().
|
protected |
Rendering is the process of pushing the document buffers into the template placeholders, retrieving data from the document and pushing it into the application response buffer.
Références $data, __DIR__, Factory\getUser(), PluginHelper\importPlugin(), JDEBUG, JPATH_BASE, JPATH_THEMES, null, et Joomla\CMS\Application\triggerEvent().
|
protected |
Route the application.
Routing is the process of examining the request environment to determine which component should receive the request. The component optional parameters are then set in the request object to be processed when the application is being dispatched.
Références $active, $base, $item, $key, $position, $result, $uri, $value, Uri\base(), Uri\getInstance(), PluginHelper\importPlugin(), null, StringHelper\strtolower(), et Joomla\CMS\Application\triggerEvent().
|
private |
setMenuFactory | ( | MenuFactoryInterface | $menuFactory | ) |
Sets the internal menu factory.
MenuFactoryInterface | $menuFactory | The menu factory |
|
private |
Setup logging functionality.
Références $mode, Log\addLogger(), Log\ALERT, Log\ALL, Log\CRITICAL, Log\EMERGENCY, et Log\ERROR.
setUserState | ( | $key, | |
$value | |||
) |
Sets the value of a user state variable.
string | $key | The path of the state. |
mixed | $value | The value of the variable. |
Implémente CMSWebApplicationInterface.
Références $key, $value, Joomla\Application\getSession(), et null.
toString | ( | $compress = false | ) |
Sends all headers prior to returning the string
boolean | $compress | If true, compress the data |
Références Laminas\Diactoros\getBody().
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
private |
|
protected |
|
protected |
|
protected |
|
protected |
$scope = null |
|
protected |