Exemplo n.º 1
0
 /**
  * Returns a reference to the a Table object, always creating it.
  *
  * @param	type	The table type to instantiate
  * @param	string	A prefix for the table class name. Optional.
  * @param	array	Configuration array for model. Optional.
  * @return	JTable	A database object
  * @since	1.6
  */
 public function getTable($type = 'Connection', $prefix = 'FabrikTable', $config = array())
 {
     // not sure if we should be loading JTable or FabTable here
     // issue with using Fabtable is that it will always load the cached verion of the cnn
     // which might cause issues when migrating from test to live sites???
     $config['dbo'] = FabriKWorker::getDbo(true);
     return FabTable::getInstance($type, $prefix, $config);
 }
Exemplo n.º 2
0
 /**
  * Returns a reference to the a Table object, always creating it.
  *
  * @param	type	The table type to instantiate
  * @param	string	A prefix for the table class name. Optional.
  * @param	array	Configuration array for model. Optional.
  * @return	JTable	A database object
  * @since	1.6
  */
 public function getTable($type = 'List', $prefix = 'FabrikTable', $config = array())
 {
     $sig = $type . $prefix . implode('.', $config);
     if (!array_key_exists($sig, $this->tables)) {
         $config['dbo'] = FabriKWorker::getDbo(true);
         $this->tables[$sig] = FabTable::getInstance($type, $prefix, $config);
     }
     return $this->tables[$sig];
 }
Exemplo n.º 3
0
 /**
  * Returns a reference to the a Table object, always creating it.
  *
  * @param   string  $type    The table type to instantiate
  * @param   string  $prefix  A prefix for the table class name. Optional.
  * @param   array   $config  Configuration array for model. Optional.
  *
  * @return  JTable	A database object
  *
  * @since	1.6
  */
 public function getTable($type = 'Package', $prefix = 'FabrikTable', $config = array())
 {
     $config['dbo'] = FabriKWorker::getDbo(true);
     return FabTable::getInstance($type, $prefix, $config);
 }
Exemplo n.º 4
0
 /**
  * Returns a reference to the a Table object, always creating it.
  *
  * @param   string  $type    The table type to instantiate
  * @param   string  $prefix  A prefix for the table class name. Optional.
  * @param   array   $config  Configuration array for model. Optional.
  *
  * @return  JTable	A database object
  */
 public function getTable($type = 'Cron', $prefix = 'FabrikTable', $config = array())
 {
     $config['dbo'] = FabriKWorker::getDbo(true);
     return parent::getTable($type, $prefix, $config);
 }
Exemplo n.º 5
0
 /**
  * Constructor.
  * Ensure that we use the fabrik db model for the dbo
  * @param	array	An optional associative array of configuration settings.
  */
 public function __construct($config = array())
 {
     $config['dbo'] = FabriKWorker::getDbo(true);
     parent::__construct($config);
 }
Exemplo n.º 6
0
 /**
  * Static method to get an instance of a JTable class if it can be found in
  * the table include paths.  To add include paths for searching for JTable
  * classes @see JTable::addIncludePath().
  *
  * @param	string	The type (name) of the JTable class to get an instance of.
  * @param	string	An optional prefix for the table class name.
  * @param	array	An optional array of configuration values for the JTable object.
  * @return	mixed	A JTable object if found or boolean false if one could not be found.
  * @since	1.5
  * @link	http://docs.joomla.org/JTable/getInstance
  */
 public static function getInstance($type, $prefix = 'JTable', $config = array())
 {
     $config['dbo'] = FabriKWorker::getDbo(true);
     return parent::getInstance($type, $prefix, $config);
 }