/** * Constructor * * @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). * * @since 1.5 */ public function __construct(&$subject, $config = array()) { parent::__construct($subject, $config); $option = JFactory::getApplication()->input->get('option'); $docType = JFactory::getDocument()->getType(); // Do not run if called from OSMap's XML view if ($option === 'com_osmap' && $docType !== 'html') { $this->allowedToRun = false; } if ($this->allowedToRun) { $this->init(); // Check the minumum requirements $helperClass = $this->getHelperClass(); if (!$helperClass::complyBasicRequirements()) { $this->allowedToRun = false; } } }
/** * Class constructor that instantiate the pro library, if installed * * @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()) { $this->namespace = 'OSSystem'; parent::__construct($subject, $config); }
public function __construct(&$subject, $config = array()) { $this->namespace = 'DumbExtension'; parent::__construct($subject, $config); }