|
| __construct (Input $input=null, Registry $config=null, \JApplicationWebClient $client=null) |
|
| checkSession () |
|
| enqueueMessage ($msg, $type='message') |
|
| execute () |
|
| getCfg ($varname, $default=null) |
|
| getClientId () |
|
| getMenu ($name=null, $options=array()) |
|
| getMessageQueue ($clear=false) |
|
| getName () |
|
| getPathway ($name=null, $options=array()) |
|
| getTemplate ($params=false) |
|
| getUserState ($key, $default=null) |
|
| getUserStateFromRequest ($key, $request, $default=null, $type='none') |
|
| isAdmin () |
|
| isSite () |
|
| isHttpsForced ($clientId=null) |
|
| isClient ($identifier) |
|
| loadSession (\JSession $session=null) |
|
| login ($credentials, $options=array()) |
|
| logout ($userid=null, $options=array()) |
|
| redirect ($url, $status=303) |
|
| setUserState ($key, $value) |
|
| toString ($compress=false) |
|
| __construct (Input $input=null, Registry $config=null, \JApplicationWebClient $client=null) |
|
| initialise ($session=null, $document=null, $language=null, $dispatcher=null) |
|
| execute () |
|
| redirect ($url, $status=303) |
|
| loadConfiguration ($data) |
|
| allowCache ($allow=null) |
|
| setHeader ($name, $value, $replace=false) |
|
| getHeaders () |
|
| clearHeaders () |
|
| sendHeaders () |
|
| setBody ($content) |
|
| prependBody ($content) |
|
| appendBody ($content) |
|
| getBody ($asArray=false) |
|
| getDocument () |
|
| getLanguage () |
|
| getSession () |
|
| flushAssets () |
|
| isSSLConnection () |
|
| loadDocument (\JDocument $document=null) |
|
| loadLanguage (\JLanguage $language=null) |
|
| loadSession (\JSession $session=null) |
|
| afterSessionStart () |
|
| __construct (Input $input=null, Registry $config=null) |
|
| getIdentity () |
|
| registerEvent ($event, $handler) |
|
| triggerEvent ($event, array $args=null) |
|
| loadDispatcher (\JEventDispatcher $dispatcher=null) |
|
| loadIdentity (\JUser $identity=null) |
|
| __construct (Input $input=null, Registry $config=null) |
|
| close ($code=0) |
|
| execute () |
|
| get ($key, $default=null) |
|
| getLogger () |
|
| set ($key, $value=null) |
|
| setConfiguration (Registry $config) |
|
| setLogger (LoggerInterface $logger) |
|
Joomla! CMS Application class
- Depuis
- 3.2
◆ __construct()
Class constructor.
- Paramètres
-
Input | $input | An optional argument to provide dependency injection for the application's input object. If the argument is a 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. |
\JApplicationWebClient | $client | An optional argument to provide dependency injection for the application's client object. If the argument is a object that object will become the application's client object, otherwise a default client object is created. |
- Depuis
- 3.2
Références $client, $config, $input, JDEBUG, et null.
◆ checkSession()
Checks the user session.
If the session record doesn't exist, initialise it. If session is new, create session variables
- Renvoie
- void
- Depuis
- 3.2
- Exceptions
-
◆ checkUserRequireReset()
checkUserRequireReset |
( |
|
$option, |
|
|
|
$view, |
|
|
|
$layout, |
|
|
|
$tasks |
|
) |
| |
|
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.
- Paramètres
-
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 |
- Renvoie
- void
Références $layout, $name, $option, $task, et $view.
◆ enqueueMessage()
enqueueMessage |
( |
|
$msg, |
|
|
|
$type = 'message' |
|
) |
| |
◆ execute()
Execute the application.
- Renvoie
- void
- Depuis
- 3.2
Références $input, et null.
◆ getCfg()
getCfg |
( |
|
$varname, |
|
|
|
$default = null |
|
) |
| |
Gets a configuration value.
- Paramètres
-
string | $varname | The name of the value to get. |
string | $default | Default value to return |
- Renvoie
- mixed The user state.
- Depuis
- 3.2
- Obsolète:
- 5.0 Use get() instead
Références $default.
◆ getClientId()
Gets the client id of the current running application.
- Renvoie
- integer A client identifier.
- Depuis
- 3.2
◆ getInstance()
static getInstance |
( |
|
$name = null | ) |
|
|
static |
◆ getMenu()
getMenu |
( |
|
$name = null , |
|
|
|
$options = array() |
|
) |
| |
Returns the application object.
- Paramètres
-
string | $name | The name of the application/client. |
array | $options | An optional associative array of configuration settings. |
- Renvoie
- |null
- Depuis
- 3.2
Références $menu, $name, et $options.
◆ getMessageQueue()
getMessageQueue |
( |
|
$clear = false | ) |
|
Get the system message queue.
- Paramètres
-
boolean | $clear | Clear the messages currently attached to the application object |
- Renvoie
- array The system message queue.
- Depuis
- 3.2
◆ getName()
Gets the name of the current running application.
- Renvoie
- string The name of the application.
- Depuis
- 3.2
◆ getPathway()
getPathway |
( |
|
$name = null , |
|
|
|
$options = array() |
|
) |
| |
Returns the application object.
- Paramètres
-
string | $name | The name of the application. |
array | $options | An optional associative array of configuration settings. |
- Renvoie
- |null
- Depuis
- 3.2
Références $name, et $options.
◆ getRouter()
static getRouter |
( |
|
$name = null , |
|
|
array |
$options = array() |
|
) |
| |
|
static |
Returns the application object.
- Paramètres
-
string | $name | The name of the application. |
array | $options | An optional associative array of configuration settings. |
- Renvoie
- |null
- Depuis
- 3.2
Références $app, $name, et $options.
◆ getTemplate()
getTemplate |
( |
|
$params = false | ) |
|
Gets the name of the current template.
- Paramètres
-
boolean | $params | An optional associative array of configuration settings |
- Renvoie
- mixed System is the fallback.
- Depuis
- 3.2
Références $params, et $template.
◆ getUserState()
getUserState |
( |
|
$key, |
|
|
|
$default = null |
|
) |
| |
Gets a user state.
- Paramètres
-
string | $key | The path of the state. |
mixed | $default | Optional default value, returned if the internal value is null. |
- Renvoie
- mixed The user state or null.
- Depuis
- 3.2
Références $default, $key, et null.
◆ getUserStateFromRequest()
getUserStateFromRequest |
( |
|
$key, |
|
|
|
$request, |
|
|
|
$default = null , |
|
|
|
$type = 'none' |
|
) |
| |
Gets the value of a user state variable.
- Paramètres
-
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 JFilterInput::clean().Optional.@returnmixedTherequestuserstate.@since3.2 |
Références $default, $key, $type, et null.
◆ initialiseApp()
initialiseApp |
( |
|
$options = array() | ) |
|
|
protected |
Initialise the application.
- Paramètres
-
array | $options | An optional associative array of configuration settings. |
- Renvoie
- void
- Depuis
- 3.2
Références $editor, $lang, $language, $options, et $user.
◆ isAdmin()
Is admin interface?
- Renvoie
- boolean True if this application is administrator.
- Depuis
- 3.2
- Obsolète:
- 4.0 Use isClient('administrator') instead.
◆ isClient()
Check the client interface by name.
- Paramètres
-
string | $identifier | String identifier for the application interface |
- Renvoie
- boolean True if this application is of the given type client interface.
- Depuis
- 3.7.0
◆ isHttpsForced()
isHttpsForced |
( |
|
$clientId = null | ) |
|
Checks if HTTPS is forced in the client configuration.
- Paramètres
-
integer | $clientId | An optional client id (defaults to current application client). |
- Renvoie
- boolean True if is forced for the client, false otherwise.
- Depuis
- 3.7.3
Références $clientId, et null.
◆ isSite()
Is site interface?
- Renvoie
- boolean True if this application is site.
- Depuis
- 3.2
- Obsolète:
- 4.0 Use isClient('site') instead.
◆ loadLibraryLanguage()
Load the library language files for the application
- Renvoie
- void
- Depuis
- 3.6.3
Références JPATH_ADMINISTRATOR.
◆ loadSession()
loadSession |
( |
\JSession |
$session = null | ) |
|
Allows the application to load a custom or default session.
The logic and options for creating this object are adequately generic for default cases but for many applications it will make sense to override this method and create a session, if required, based on more specific needs.
- Paramètres
-
\JSession | $session | An optional session object. If omitted, the session is created. |
- Renvoie
- CMSApplication This method is chainable.
- Depuis
- 3.2
Références null.
◆ login()
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.
- Paramètres
-
array | $credentials | Array('username' => string, 'password' => string) |
array | $options | Array('remember' => boolean) |
- Renvoie
- boolean| True on success, false if failed or silent handling is configured, or a object on authentication error.
- Depuis
- 3.2
Références $options, $results, et $user.
◆ logout()
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.
- Paramètres
-
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) |
- Renvoie
- boolean True on success
- Depuis
- 3.2
Références $options, $parameters, $results, et $user.
◆ redirect()
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.
- Paramètres
-
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. |
- Renvoie
- void
- Depuis
- 3.2
Références $message, $type, et $url.
◆ render()
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.
- Renvoie
- void
- Depuis
- 3.2
Références $data, JDEBUG, JPATH_BASE, JPATH_THEMES, et null.
◆ route()
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.
- Renvoie
- void
- Depuis
- 3.2
Références $active, $base, $item, $key, $position, $uri, $value, et null.
◆ setUserState()
setUserState |
( |
|
$key, |
|
|
|
$value |
|
) |
| |
Sets the value of a user state variable.
- Paramètres
-
string | $key | The path of the state. |
mixed | $value | The value of the variable. |
- Renvoie
- mixed The previous state, if one existed.
- Depuis
- 3.2
Références $key, $value, et null.
◆ toString()
toString |
( |
|
$compress = false | ) |
|
Sends all headers prior to returning the string
- Paramètres
-
boolean | $compress | If true, compress the data |
- Renvoie
- string
- Depuis
- 3.2
◆ $_clientId
◆ $_messageQueue
◆ $_name
◆ $docOptions
◆ $instances
◆ $profiler
◆ $scope
◆ $template
La documentation de cette classe a été générée à partir du fichier suivant :