protected function _initialize(Library\ObjectConfig $config) { if (empty($config->adapters)) { $config->adapters = array('curl', 'fsockopen', 'fopen'); } elseif (is_string($config->adapters)) { $config->adapters = array($config->adapters); } parent::_initialize($config); }
public function __get($name) { if ($name == 'params' && !$this->_data['params'] instanceof JParameter) { $path = Library\ClassLoader::getInstance()->getApplication('admin'); $file = $path . '/component/' . $this->option . '/resources/config/settings.xml'; $this->_data['params'] = new JParameter($this->_data['params'], $file, 'component'); } return parent::__get($name); }
protected function _initialize(Library\ObjectConfig $config) { $config->append(array('identity_column' => 'name')); parent::_initialize($config); }
/** * Checks if the current row is an ancestor of the given one * * @param Library\DatabaseRowAbstract $row * @return boolean */ public function isAncestorOf(Library\DatabaseRowAbstract $row) { return in_array($this->id, $row->getParentIds()); }
/** * Initializes the options for the object * * Called from {@link __construct()} as a first step of object instantiation. * * @param object An optional Library\ObjectConfig object with configuration options. * @return void */ protected function _initialize(Library\ObjectConfig $config) { $config->append(array('status' => Library\Database::STATUS_LOADED, 'name' => 'system', 'path' => '')); parent::_initialize($config); }
public function toArray() { $data = parent::toArray(); unset($data['_token']); unset($data['action']); unset($data['option']); unset($data['format']); unset($data['view']); $data['container'] = $this->getContainer()->slug; $data['type'] = $this->getIdentifier()->name; return $data; }