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é
Référence de la classe FOFPlatform
+ Graphe d'héritage de FOFPlatform:

Fonctions membres publiques

 getOrdering ()
 
 isEnabled ()
 
 getIntegrationObject ($key)
 
 setIntegrationObject ($key, $object)
 
 setErrorHandling ($level, $log_level, $options=array())
 
 getComponentBaseDirs ($component)
 
 getViewTemplatePaths ($component, $view, $layout='default', $tpl=null, $strict=false)
 
 getTemplateSuffixes ()
 
 getTemplateOverridePath ($component, $absolute=true)
 
 loadTranslations ($component)
 
 authorizeAdmin ($component)
 
 getUser ($id=null)
 
 getDocument ()
 
 getUserStateFromRequest ($key, $request, $input, $default=null, $type='none', $setUserState=true)
 
 importPlugin ($type)
 
 runPlugins ($event, $data)
 
 authorise ($action, $assetname)
 
 isBackend ()
 
 isFrontend ()
 
 isCli ()
 
 supportsAjaxOrdering ()
 
 checkVersion ($version1, $version2, $operator)
 
 setCache ($key, $content)
 
 getCache ($key, $default=null)
 
 isGlobalFOFCacheEnabled ()
 
 clearCache ()
 
 loginUser ($authInfo)
 
 logoutUser ()
 
 logDeprecated ($message)
 
 getPlatformName ()
 
 getPlatformVersion ()
 
 getPlatformHumanName ()
 
- Fonctions membres publiques hérités de FOFPlatformInterface
 checkExecution ()
 
 raiseError ($code, $message)
 
 getPlatformBaseDirs ()
 
 getDate ($time='now', $tzOffest=null, $locale=true)
 
 getLanguage ()
 
 getDbo ()
 
 getConfig ()
 
 logAddLogger ($file)
 
 logDebug ($message)
 
 URIroot ($pathonly=false, $path=null)
 
 URIbase ($pathonly=false)
 
 setHeader ($name, $value, $replace=false)
 
 sendHeaders ()
 

Fonctions membres publiques statiques

static registerPlatformPath ($path)
 
static unregisterPlatformPath ($path)
 
static forceInstance ($instance)
 
static getInstance ()
 

Champs de données

 $ordering = 100
 
 $name = ''
 
 $humanReadableName = 'Unknown Platform'
 
 $version = ''
 

Attributs protégés

 $isEnabled = null
 
 $objectCache = array()
 

Attributs protégés statiques

static $paths = array()
 
static $instance = null
 

Documentation des fonctions membres

◆ authorise()

authorise (   $action,
  $assetname 
)

Perform an ACL check.

Paramètres
string$actionThe ACL privilege to check, e.g. core.edit
string$assetnameThe asset name to check, typically the component's name
Voir également
FOFPlatformInterface::authorise()
Renvoie
boolean True if the user is allowed this action

Implémente FOFPlatformInterface.

◆ authorizeAdmin()

authorizeAdmin (   $component)

Authorise access to the component in the back-end.

Paramètres
string$componentThe name of the component.
Voir également
FOFPlatformInterface::authorizeAdmin()
Renvoie
boolean True to allow loading the component, false to halt loading

Implémente FOFPlatformInterface.

◆ checkVersion()

checkVersion (   $version1,
  $version2,
  $operator 
)

Performs a check between two versions. Use this function instead of PHP version_compare so we can mock it while testing

Paramètres
string$version1First version number
string$version2Second version number
string$operatorOperator (see version_compare for valid operators)
Renvoie
boolean

Implémente FOFPlatformInterface.

Références $version1, et $version2.

◆ clearCache()

clearCache ( )

Clears the cache of system-wide FOF data. You are supposed to call this in your components' installation script post-installation and post-upgrade methods or whenever you are modifying the structure of database tables accessed by FOF. Please note that FOF's cache never expires and is not purged by Joomla!. You MUST use this method to manually purge the cache.

Renvoie
boolean True on success

Implémente FOFPlatformInterface.

◆ forceInstance()

static forceInstance (   $instance)
static

Force a specific platform object to be used. If null, nukes the cache

Paramètres
FOFPlatformInterface | null$instanceThe Platform object to be used
Renvoie
void

◆ getCache()

getCache (   $key,
  $default = null 
)

Retrieves data from the cache. This is supposed to be used for system-side FOF data, not application data.

Paramètres
string$keyThe key of the data to retrieve
string$defaultThe default value to return if the key is not found or the cache is not populated
Renvoie
string The cached value

Implémente FOFPlatformInterface.

◆ getComponentBaseDirs()

getComponentBaseDirs (   $component)

Returns the base (root) directories for a given component.

Paramètres
string$componentThe name of the component. For Joomla! this is something like "com_example"
Voir également
FOFPlatformInterface::getComponentBaseDirs()
Renvoie
array A hash array with keys main, alt, site and admin.

Implémente FOFPlatformInterface.

◆ getDocument()

getDocument ( )

Returns the JDocument object which handles this component's response.

Voir également
FOFPlatformInterface::getDocument()
Renvoie
JDocument

Implémente FOFPlatformInterface.

Références null.

◆ getInstance()

static getInstance ( )
static

Find and return the most relevant platform object

Renvoie
FOFPlatformInterface

Références $path, et null.

Référencé par FOFInput\__callStatic(), FOFViewRaw\__construct(), FOFDatabaseInstaller\__construct(), FOFUtilsFilescheck\__construct(), FOFUtilsUpdate\__construct(), FOFToolbar\__construct(), FOFView\__construct(), FOFController\__construct(), FOFTable\__construct(), FOFModel\__construct(), FOFUtilsInstallscript\_applyPostInstallationMessages(), FOFController\_createModel(), FOFController\_createView(), FOFController\_csrfProtection(), FOFUtilsInstallscript\_reallyPublishAdminMenuItems(), FOFViewJson\_removeURIBase(), FOFView\_setPath(), FOFTemplateUtils\addCSS(), FOFModel\addIncludePath(), FOFTemplateUtils\addJS(), FOFTemplateUtils\addLESS(), FOFController\addPath(), FOFUtilsInstallscript\addPostInstallationMessage(), FOFModel\applyAccessFiltering(), FOFController\applySave(), FOFView\assign(), FOFView\assignRef(), FOFController\authorise(), FOFAutoloaderComponent\autoload_fof_controller(), FOFAutoloaderComponent\autoload_fof_field(), FOFAutoloaderComponent\autoload_fof_helper(), FOFAutoloaderComponent\autoload_fof_model(), FOFAutoloaderComponent\autoload_fof_table(), FOFAutoloaderComponent\autoload_fof_toolbar(), FOFAutoloaderComponent\autoload_fof_view(), FOFUtilsInstallscript\bugfixCantBuildAdminMenus(), FOFUtilsInstallscript\bugfixDBFunctionReturnedNoError(), FOFController\checkACL(), FOFTable\checkout(), FOFModel\checkout(), FOFModel\cleanCache(), FOFLess\compileFile(), FOFController\copy(), FOFController\createView(), FOFDispatcher\dispatch(), FOFViewForm\display(), FOFView\display(), FOFController\display(), FOFModelField\exact(), FOFController\execute(), FOFLess\fileExists(), FOFModel\findFormFilename(), FOFView\findRenderer(), FOFUtilsUpdate\findUpdatesJoomla(), FOFTemplateUtils\getAltPaths(), FOFToolbar\getAnInstance(), FOFModel\getAnInstance(), FOFTable\getAnInstance(), FOFFormFieldCalendar\getCalendar(), FOFUtilsUpdate\getCommonParameter(), FOFConfigProvider\getDomains(), FOFModelField\getField(), FOFFormHeaderFielddate\getFilter(), FOFFormFieldRules\getInput25(), FOFFormFieldRules\getInput3x(), FOFController\getItemidURLSuffix(), FOFController\getModel(), FOFToolbar\getMyViews(), FOFQueryAbstract\getNew(), FOFFormHeaderFieldselectable\getOptions(), FOFFormHeaderFieldsql\getOptions(), FOFFormHeaderAccesslevel\getOptions(), FOFFormFieldTag\getOptions(), FOFFormFieldComponents\getOptions(), FOFFormFieldList\getOptions(), FOFLayoutFile\getPath(), FOFFormFieldOrdering\getQuery(), FOFFormFieldUsergroup\getRepeatable(), FOFFormFieldAccesslevel\getRepeatable(), FOFFormFieldUser\getRepeatable(), FOFFormFieldAccesslevel\getStatic(), FOFFormFieldUsergroup\getStatic(), FOFFormFieldMedia\getStatic(), FOFFormFieldImagelist\getStatic(), FOFModel\getTable(), FOFTable\getTableFields(), FOFDispatcher\getTask(), FOFController\getThisView(), FOFDispatcher\getTmpInstance(), FOFController\getTmpInstance(), UsersModelProfile\getTwofactorform(), UsersModelUser\getTwofactorform(), UsersHelper\getTwoFactorMethods(), FOFUtilsUpdate\getUpdateSiteIds(), FOFModel\getUserStateFromRequest(), FOFUtilsInstallscript\installSubextensions(), FOFDispatcher\isCliAdmin(), FOFAutoloaderComponent\isFOFComponent(), UsersModelUser\isValidSecretKey(), FOFView\loadAnyTemplate(), FOFFormHelper\loadClass(), FOFUtilsConfigHelper\loadComponentConfig(), FOFModel\loadForm(), FOFView\loadHelper(), FOFTemplateUtils\loadPosition(), FOFView\loadTemplate(), FOFRenderStrapper\loadValidationScript(), FOFRenderJoomla\loadValidationScript(), FOFToolbar\onAdd(), FOFModelBehaviorPrivate\onAfterBuildQuery(), FOFModelBehaviorEnabled\onAfterBuildQuery(), FOFModelBehaviorAccess\onAfterBuildQuery(), FOFModelBehaviorLanguage\onAfterBuildQuery(), FOFModel\onAfterDelete(), FOFDispatcher\onAfterDispatch(), FOFModelBehaviorAccess\onAfterGetItem(), FOFModelBehaviorPrivate\onAfterGetItem(), FOFModelBehaviorLanguage\onAfterGetItem(), FOFModel\onAfterSave(), FOFModelBehaviorLanguage\onBeforeBuildQuery(), FOFModel\onBeforeDelete(), FOFDispatcher\onBeforeDispatchCLI(), FOFModel\onBeforeSave(), FOFToolbar\onBrowse(), FOFToolbar\onCpanelsBrowse(), FOFViewJson\onDisplay(), FOFViewCsv\onDisplay(), FOFViewRaw\onDisplay(), FOFViewRaw\onEdit(), FOFToolbar\onEdit(), FOFViewJson\onRead(), FOFToolbar\onRead(), PlgTwofactorauthYubikey\onUserTwofactorShowConfiguration(), PlgTwofactorauthTotp\onUserTwofactorShowConfiguration(), FOFConfigProvider\parseComponent(), FOFConfigProvider\parseComponentArea(), FOFTemplateUtils\parsePath(), FOFUtilsInstallscript\postflight(), FOFRenderJoomla3\postRender(), FOFRenderJoomla\postRender(), FOFRenderStrapper\postRender(), FOFModel\preprocessForm(), FOFRenderJoomla3\preRender(), FOFRenderStrapper\preRender(), FOFRenderJoomla\preRender(), FOFViewHtml\preRender(), FOFModel\publish(), FOFRenderStrapper\renderButtons(), FOFRenderJoomla\renderButtons(), FOFRenderAbstract\renderCategoryLinkbar(), FOFRenderStrapper\renderFieldsetLabel(), FOFRenderJoomla\renderFormBrowse(), FOFRenderStrapper\renderFormBrowse(), FOFRenderJoomla\renderFormEdit(), FOFRenderStrapper\renderFormEdit(), FOFToolbar\renderFromConfig(), FOFRenderJoomla\renderLinkbar(), FOFRenderStrapper\renderLinkbar_classic(), FOFRenderStrapper\renderLinkbar_joomla(), AdminModelProfile\save(), UsersModelUser\save(), UsersModelProfile\save(), FOFUtilsUpdate\setCommonParameter(), FOFView\setEscape(), FOFModel\setId(), FOFController\setRedirect(), FOFInput\setVar(), FOFFormFieldComponents\translate(), FOFDispatcher\transparentAuthentication(), FOFUtilsInstallscript\uninstallObsoleteSubextensions(), FOFUtilsInstallscript\uninstallPostInstallationMessages(), FOFUtilsInstallscript\uninstallSubextensions(), et FOFUtilsUpdate\updateComponent().

◆ getIntegrationObject()

getIntegrationObject (   $key)

Returns a platform integration object

Paramètres
string$keyThe key name of the platform integration object, e.g. 'filesystem'
Renvoie
object
Depuis
2.1.2

Implémente FOFPlatformInterface.

Références $className, et $key.

◆ getOrdering()

getOrdering ( )

Returns the ordering of the platform class.

Voir également
FOFPlatformInterface::getOrdering()
Renvoie
integer

Implémente FOFPlatformInterface.

Références $ordering.

◆ getPlatformHumanName()

getPlatformHumanName ( )

Returns the human readable platform name, e.g. "Joomla!", "Joomla! Framework", "Something Something Something Framework" etc.

Renvoie
string
Depuis
2.1.2

Implémente FOFPlatformInterface.

◆ getPlatformName()

getPlatformName ( )

Returns the (internal) name of the platform implementation, e.g. "joomla", "foobar123" etc. This MUST be the last part of the platform class name. For example, if you have a platform implementation class FOFPlatformFoobar you MUST return "foobar" (all lowercase).

Renvoie
string
Depuis
2.1.2

Implémente FOFPlatformInterface.

Références $name.

◆ getPlatformVersion()

getPlatformVersion ( )

Returns the version number string of the platform, e.g. "4.5.6". If implementation integrates with a CMS or a versioned foundation (e.g. a framework) it is advisable to return that version.

Renvoie
string
Depuis
2.1.2

Implémente FOFPlatformInterface.

Références $version.

◆ getTemplateOverridePath()

getTemplateOverridePath (   $component,
  $absolute = true 
)

Return the absolute path to the application's template overrides directory for a specific component. We will use it to look for template files instead of the regular component directories. If the application does not have such a thing as template overrides return an empty string.

Paramètres
string$componentThe name of the component for which to fetch the overrides
boolean$absoluteShould I return an absolute or relative path?
Renvoie
string The path to the template overrides directory

Implémente FOFPlatformInterface.

◆ getTemplateSuffixes()

getTemplateSuffixes ( )

Get application-specific suffixes to use with template paths. This allows you to look for view template overrides based on the application version.

Renvoie
array A plain array of suffixes to try in template names

Implémente FOFPlatformInterface.

◆ getUser()

getUser (   $id = null)

Returns the JUser object for the current user

Paramètres
integer$idThe ID of the user to fetch
Voir également
FOFPlatformInterface::getUser()
Renvoie
JDocument

Implémente FOFPlatformInterface.

Références null.

◆ getUserStateFromRequest()

getUserStateFromRequest (   $key,
  $request,
  $input,
  $default = null,
  $type = 'none',
  $setUserState = true 
)

This method will try retrieving a variable from the request (input) data.

Paramètres
string$keyThe user state key for the variable
string$requestThe request variable name for the variable
FOFInput$inputThe FOFInput object with the request (input) data
mixed$defaultThe default value. Default: null
string$typeThe filter type for the variable data. Default: none (no filtering)
boolean$setUserStateShould I set the user state with the fetched value?
Voir également
FOFPlatformInterface::getUserStateFromRequest()
Renvoie
mixed The value of the variable

Implémente FOFPlatformInterface.

Références $default, $input, et $type.

◆ getViewTemplatePaths()

getViewTemplatePaths (   $component,
  $view,
  $layout = 'default',
  $tpl = null,
  $strict = false 
)

Return a list of the view template directories for this component.

Paramètres
string$componentThe name of the component. For Joomla! this is something like "com_example"
string$viewThe name of the view you're looking a template for
string$layoutThe layout name to load, e.g. 'default'
string$tplThe sub-template name to load (null by default)
boolean$strictIf true, only the specified layout will be searched for. Otherwise we'll fall back to the 'default' layout if the specified layout is not found.
Voir également
FOFPlatformInterface::getViewTemplateDirs()
Renvoie
array

Implémente FOFPlatformInterface.

◆ importPlugin()

importPlugin (   $type)

Load plugins of a specific type. Obviously this seems to only be required in the Joomla! CMS.

Paramètres
string$typeThe type of the plugins to be loaded
Voir également
FOFPlatformInterface::importPlugin()
Renvoie
void

Implémente FOFPlatformInterface.

◆ isBackend()

isBackend ( )

Is this the administrative section of the component?

Voir également
FOFPlatformInterface::isBackend()
Renvoie
boolean

Implémente FOFPlatformInterface.

◆ isCli()

isCli ( )

Is this a component running in a CLI application?

Voir également
FOFPlatformInterface::isCli()
Renvoie
boolean

Implémente FOFPlatformInterface.

◆ isEnabled()

isEnabled ( )

Is this platform enabled?

Voir également
FOFPlatformInterface::isEnabled()
Renvoie
boolean

Implémente FOFPlatformInterface.

◆ isFrontend()

isFrontend ( )

Is this the public section of the component?

Voir également
FOFPlatformInterface::isFrontend()
Renvoie
boolean

Implémente FOFPlatformInterface.

◆ isGlobalFOFCacheEnabled()

isGlobalFOFCacheEnabled ( )

Is the global FOF cache enabled?

Renvoie
boolean

Implémente FOFPlatformInterface.

◆ loadTranslations()

loadTranslations (   $component)

Load the translation files for a given component.

Paramètres
string$componentThe name of the component. For Joomla! this is something like "com_example"
Voir également
FOFPlatformInterface::loadTranslations()
Renvoie
void

Implémente FOFPlatformInterface.

Références null.

◆ logDeprecated()

logDeprecated (   $message)

Logs a deprecated practice. In Joomla! this results in the $message being output in the deprecated log file, found in your site's log directory.

Paramètres
$messageThe deprecated practice log message
Renvoie
void

Implémente FOFPlatformInterface.

◆ loginUser()

loginUser (   $authInfo)

logs in a user

Paramètres
array$authInfoauthentication information
Renvoie
boolean True on success

Implémente FOFPlatformInterface.

◆ logoutUser()

logoutUser ( )

logs out a user

Renvoie
boolean True on success

Implémente FOFPlatformInterface.

◆ registerPlatformPath()

static registerPlatformPath (   $path)
static

Register a path where platform files will be looked for. These take precedence over the built-in platform files.

Paramètres
string$pathThe path to add
Renvoie
void

Références $path, et null.

◆ runPlugins()

runPlugins (   $event,
  $data 
)

Execute plugins (system-level triggers) and fetch back an array with their return values.

Paramètres
string$eventThe event (trigger) name, e.g. onBeforeScratchMyEar
array$dataA hash array of data sent to the plugins as part of the trigger
Voir également
FOFPlatformInterface::runPlugins()
Renvoie
array A simple array containing the results of the plugins triggered

Implémente FOFPlatformInterface.

◆ setCache()

setCache (   $key,
  $content 
)

Saves something to the cache. This is supposed to be used for system-wide FOF data, not application data.

Paramètres
string$keyThe key of the data to save
string$contentThe actual data to save
Renvoie
boolean True on success

Implémente FOFPlatformInterface.

◆ setErrorHandling()

setErrorHandling (   $level,
  $log_level,
  $options = array() 
)

Set the error Handling, if possible

Paramètres
integer$levelPHP error level (E_ALL)
string$log_levelWhat to do with the error (ignore, callback)
array$optionsOptions for the error handler
Renvoie
void

Implémente FOFPlatformInterface.

Références $options, et JError\setErrorHandling().

◆ setIntegrationObject()

setIntegrationObject (   $key,
  $object 
)

Forces a platform integration object instance

Paramètres
string$keyThe key name of the platform integration object, e.g. 'filesystem'
object$objectThe object to force for this key
Renvoie
object
Depuis
2.1.2

Implémente FOFPlatformInterface.

Références $key.

◆ supportsAjaxOrdering()

supportsAjaxOrdering ( )

Is AJAX re-ordering supported? This is 100% Joomla!-CMS specific. All other platforms should return false and never ask why.

Voir également
FOFPlatformInterface::supportsAjaxOrdering()
Renvoie
boolean

Implémente FOFPlatformInterface.

◆ unregisterPlatformPath()

static unregisterPlatformPath (   $path)
static

Unregister a path where platform files will be looked for.

Paramètres
string$pathThe path to remove
Renvoie
void

Références $path, et null.

Documentation des champs

◆ $humanReadableName

$humanReadableName = 'Unknown Platform'

◆ $instance

$instance = null
staticprotected

◆ $isEnabled

$isEnabled = null
protected

◆ $name

$name = ''

◆ $objectCache

$objectCache = array()
protected

◆ $ordering

$ordering = 100

◆ $paths

$paths = array()
staticprotected

◆ $version

$version = ''

La documentation de cette classe a été générée à partir du fichier suivant :