Source for file plugin.php
Documentation is available at plugin.php
* @package Joomla.Platform
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
* @package Joomla.Platform
* A JRegistry object holding the parameters for the plugin
* Affects constructor behavior. If true, language files will be loaded automatically.
* @param object &$subject The object to observe
* @param array $config An optional associative array of configuration settings.
* Recognized key values include 'name', 'group', 'params', 'language'
* (this list is not meant to be comprehensive).
public function __construct(&$subject, $config =
array())
if (isset
($config['params']))
$this->params =
$config['params'];
if (isset
($config['name']))
$this->_name =
$config['name'];
if (isset
($config['type']))
$this->_type =
$config['type'];
// Load the language files if needed.
$reflection =
new ReflectionClass($this);
$appProperty =
$reflection->getProperty('app');
if ($appProperty->isPrivate() ===
false &&
is_null($this->app))
$reflection =
new ReflectionClass($this);
$dbProperty =
$reflection->getProperty('db');
if ($dbProperty->isPrivate() ===
false &&
is_null($this->db))
* Loads the plugin language file
* @param string $extension The extension for which a language file should be loaded
* @param string $basePath The basepath to use
* @return boolean True, if the file has successfully loaded.
public function loadLanguage($extension =
'', $basePath =
JPATH_ADMINISTRATOR)
$extension =
'plg_' .
$this->_type .
'_' .
$this->_name;
return $lang->load(strtolower($extension), $basePath, null, false, true)
Documentation generated on Tue, 19 Nov 2013 15:10:43 +0100 by phpDocumentor 1.4.3