/** * Constructor * * Prevent creating instances of this class by making the contructor private * * @param object An optional KConfig object with configuration options */ public function __construct(KConfig $config) { parent::__construct($config); if (JFactory::getConfig()->getValue('config.caching')) { $this->_cache = JFactory::getCache('template', 'output'); } }
/** * Constructor * * Prevent creating instances of this class by making the contructor private * * @param object An optional KConfig object with configuration options */ public function __construct(KConfig $config) { parent::__construct($config); $caching = version_compare(JVERSION, '3.0', 'ge') ? JFactory::getConfig()->get('caching') : JFactory::getConfig()->getValue('config.caching'); if ($caching) { $this->_cache = JFactory::getCache('template', 'output'); } }
/** * Constructor * * Prevent creating instances of this class by making the contructor private * * @param object An optional KConfig object with configuration options */ public function __construct(KConfig $config) { parent::__construct($config); if(KFactory::get('joomla:config')->getValue('config.caching')) { $this->_cache = KFactory::get('joomla:cache', array('template', 'output')); } }
/** * Constructor * * @param KObjectConfig $config An optional ObjectConfig object with configuration options */ public function __construct(KObjectConfig $config) { parent::__construct($config); $this->__template = $config->template; //Reset the stack $this->_stack = array(); //Set debug $this->_debug = $config->debug; //Set caching $this->_cache = $config->cache; $this->_cache_path = $config->cache_path; $this->_cache_reload = $config->cache_reload; }
/** * Constructor * * Prevent creating instances of this class by making the constructor private * * @param KObjectConfig $config An optional ObjectConfig object with configuration options */ public function __construct(KObjectConfig $config) { parent::__construct($config); //Set the filter queue $this->__filter_queue = $this->getObject('lib:object.queue'); //Attach the filters $filters = KObjectConfig::unbox($config->filters); foreach ($filters as $key => $value) { if (is_numeric($key)) { $this->addFilter($value); } else { $this->addFilter($key, $value); } } //Set the parameters $this->setParameters($config->parameters); }
/** * Constructor. * * @param KConfig $config An optional KConfig object with configuration options. * * @return void */ public function __construct(KConfig $config) { parent::__construct($config); $this->_data = KConfig::unbox($config->data); $this->_parsed_data = new ArrayObject(); }