/**
  * Instantiate the model.
  *
  * @param   JRegistry  $state  The model state.
  */
 public function __construct(JRegistry $state = null)
 {
     $this->db = JFactory::getDbo();
     $this->id = JFactory::getApplication()->input->getInt('id');
     $this->table = new ECR_CLASS_PREFIXTableECR_UCF_COM_NAME($this->db);
     parent::__construct($state);
 }
Exemple #2
0
 /**
  * Constructor: Deletes the default installation config file and recreates it with the good config file.
  *
  * @since  3.1
  */
 public function __construct()
 {
     // Overrides application config and set the configuration.php file so tokens and database works
     JFactory::$config = null;
     JFactory::getConfig(JPATH_SITE . '/configuration.php');
     JFactory::$session = null;
     parent::__construct();
 }
Exemple #3
0
 /**
  * Constructor: Deletes the default installation config file and recreates it with the good config file.
  *
  * @since  3.1
  */
 public function __construct()
 {
     // Overrides application config and set the configuration.php file so tokens and database works.
     JFactory::$config = null;
     JFactory::getConfig(JPATH_SITE . '/configuration.php');
     /*
      * JFactory::getDbo() gets called during app bootup, and because of the "uniqueness" of the install app, the config doesn't get read
      * correctly at that point.  So, we have to reset the factory database object here so that we can get a valid database configuration.
      * The day we have proper dependency injection will be a glorious one.
      */
     JFactory::$database = null;
     parent::__construct();
 }
Exemple #4
0
 /**
  * Method to instantiate the model.
  *
  * @param   JContentFactory  $factory  The content factory.
  * @param   JDatabaseDriver  $db       The database adpater.
  * @param   JRegistry        $state    The model state.
  *
  * @since   1.0
  */
 public function __construct(JContentFactory $factory = null, JDatabaseDriver $db = null, JRegistry $state = null)
 {
     parent::__construct($state);
     // Set factory
     if ($factory == null) {
         $this->factory = JContentFactory::getInstance();
     } else {
         $this->factory = $factory;
     }
     // Set database
     if ($db == null) {
         $this->db = JFactory::getDbo();
     } else {
         $this->db = $db;
     }
 }
 function __construct()
 {
     parent::__construct();
     $this->_db = JFactory::getDBO();
     $app = JFactory::getApplication();
     $ids = $app->input->get("cids", null, 'array');
     $id = $app->input->get("account_id");
     if ($id && $id > 0) {
         $this->id = $id;
     } else {
         if (count($ids) == 1) {
             $this->id = $ids[0];
         } else {
             $this->id = $ids;
         }
     }
 }
Exemple #6
0
 /**
  * Instantiate the model.
  *
  * @param   JRegistry        $state  The model state.
  * @param   JDatabaseDriver  $db     The database adpater.
  *
  * @since   12.1
  */
 public function __construct(JRegistry $state = null, JDatabaseDriver $db = null)
 {
     parent::__construct($state);
     // Setup the model.
     $this->db = isset($db) ? $db : $this->loadDb();
 }
Exemple #7
0
 public function __construct($state = null)
 {
     parent::__construct($state);
     $this->execute();
 }
Exemple #8
0
 function __construct()
 {
     parent::__construct();
 }