/**
  * Initializes the options for the object
  *
  * Called from {@link __construct()} as a first step of object instantiation.
  *
  * @param   object  An optional KConfig object with configuration options.
  * @return  void
  */
 protected function _initialize(KConfig $config)
 {
     $db = JFactory::getDBO();
     $resource = method_exists($db, 'getConnection') ? $db->getConnection() : $db->_resource;
     $prefix = method_exists($db, 'getPrefix') ? $db->getPrefix() : $db->_table_prefix;
     $config->append(array('connection' => $resource, 'table_prefix' => $prefix));
     parent::_initialize($config);
 }
Esempio n. 2
0
 /**
  * Initializes the options for the object
  *
  * Called from {@link __construct()} as a first step of object instantiation.
  *
  * @param   KObjectConfig $config Configuration options.
  * @return  void
  */
 protected function _initialize(KObjectConfig $config)
 {
     $db = JFactory::getDBO();
     $config->append(array('connection' => $db->getConnection(), 'table_prefix' => $db->getPrefix()));
     parent::_initialize($config);
 }