![]() |
Joomla CMS
3.10.11 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.10.11 et du framework Joomla Platform intégré
|
Fonctions membres publiques | |
__construct ($config=array()) | |
initialise ($options=array()) | |
route () | |
dispatch ($component=null) | |
render () | |
redirect ($url, $msg='', $msgType='message', $moved=false) | |
enqueueMessage ($msg, $type='message') | |
getMessageQueue () | |
getCfg ($varname, $default=null) | |
getName () | |
getUserState ($key, $default=null) | |
setUserState ($key, $value) | |
getUserStateFromRequest ($key, $request, $default=null, $type='none') | |
login ($credentials, $options=array()) | |
logout ($userid=null, $options=array()) | |
getTemplate ($params=false) | |
getPathway ($name=null, $options=array()) | |
getMenu ($name=null, $options=array()) | |
checkSession () | |
afterSessionStart () | |
getClientId () | |
isAdmin () | |
isSite () | |
isClient ($identifier) | |
isSSLConnection () | |
__toString () | |
![]() | |
__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) | |
Fonctions membres publiques statiques | |
static | getInstance ($client, $config=array(), $prefix='J') |
static | getRouter ($name=null, array $options=array()) |
static | stringURLSafe ($string) |
static | getHash ($seed) |
static | isWinOs () |
Champs de données | |
$scope = null | |
$requestTime = null | |
$startTime = null | |
$client | |
![]() | |
$input | |
Fonctions membres protégées | |
_createConfiguration ($file) | |
_createSession ($name) | |
![]() | |
doExecute () | |
![]() | |
doExecute () | |
initialise () | |
Attributs protégés | |
$_clientId = null | |
$_messageQueue = array() | |
$_name = null | |
![]() | |
$dispatcher | |
$identity | |
![]() | |
$config | |
Attributs protégés statiques | |
static | $instances = array() |
Base class for a Joomla! application.
Acts as a Factory class for application specific objects and provides many supporting API functions. Derived clases should supply the route(), dispatch() and render() functions.
__construct | ( | $config = array() | ) |
Class constructor.
array | $config | A configuration array including optional elements such as session session_name, clientId and others. This is not exhaustive. |
Références $config, et JPATH_CONFIGURATION.
__toString | ( | ) |
Returns the response as a string.
Références JResponse\toString().
|
protected |
Create the configuration registry.
string | $file | The path to the configuration file |
Références $config, $file, et JLoader\register().
|
protected |
Create the user session.
Old sessions are flushed based on the configuration value for the cookie lifetime. If an existing session, then the last access time is updated. If a new session, a session id is generated and a record is created in the #__sessions table.
string | $name | The sessions name. |
afterSessionStart | ( | ) |
After the session has been started we need to populate it with some default values.
checkSession | ( | ) |
dispatch | ( | $component = null | ) |
Dispatch the application.
Dispatching is the process of pulling the option from the request object and mapping them to a component. If the component does not exist, it handles determining a default component to dispatch.
string | $component | The component to dispatch. |
Références $component, $document, et getDocument.
enqueueMessage | ( | $msg, | |
$type = 'message' |
|||
) |
getCfg | ( | $varname, | |
$default = null |
|||
) |
getClientId | ( | ) |
Gets the client id of the current running application.
|
static |
Provides a secure hash based on a seed
string | $seed | Seed string. |
|
static |
Returns the global JApplicationCms object, only creating it if it doesn't already exist.
mixed | $client | A client identifier or name. |
array | $config | An optional associative array of configuration settings. |
string | $prefix | A prefix for class names |
Références $client.
getMenu | ( | $name = null , |
|
$options = array() |
|||
) |
getMessageQueue | ( | ) |
getName | ( | ) |
getPathway | ( | $name = null , |
|
$options = array() |
|||
) |
|
static |
getTemplate | ( | $params = false | ) |
getUserState | ( | $key, | |
$default = 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 JFilterInput::clean(). Optional. |
initialise | ( | $options = array() | ) |
isAdmin | ( | ) |
Is admin interface?
isClient | ( | $identifier | ) |
Check the client interface by name.
string | $identifier | String identifier for the application interface |
isSite | ( | ) |
isSSLConnection | ( | ) |
Determine if we are using a secure (SSL) connection.
|
static |
Method to determine if the host OS is Windows
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, et JError\raiseWarning().
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, et $user.
redirect | ( | $url, | |
$msg = '' , |
|||
$msgType = 'message' , |
|||
$moved = false |
|||
) |
Redirect to another URL.
Optionally enqueues a message in the system message queue (which will be displayed the next time a page is loaded) using the enqueueMessage method. If the headers have not been sent the redirect will be accomplished using a "301 Moved Permanently" 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 |
string | $msg | An optional message to display on redirect. |
string | $msgType | An optional message type. Defaults to message. |
boolean | $moved | True if the page is 301 Permanently Moved, otherwise 303 See Other is assumed. |
Références $document, $parts, $path, $prefix, $uri, $url, getDocument, jimport(), json_encode, et utf8_is_ascii().
render | ( | ) |
Render the application.
Rendering is the process of pushing the document buffers into the template placeholders, retrieving data from the document and pushing it into the JResponse buffer.
Références $document, $params, $template, getDocument, JPATH_THEMES, et JResponse\setBody().
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.
setUserState | ( | $key, | |
$value | |||
) |
|
static |
This method transliterates a string into a URL safe string or returns a URL safe UTF-8 string based on the global configuration
string | $string | String to process |
|
protected |
|
protected |
|
protected |
$client |
|
staticprotected |
$requestTime = null |
$scope = null |
$startTime = null |