コード例 #1
0
 /**
  * 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);
 }
コード例 #2
0
ファイル: languages.php プロジェクト: Tommar/remate
 /**
  * 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();
 }
コード例 #3
0
ファイル: languages.php プロジェクト: klas/joomla-cms
 /**
  * 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();
 }
コード例 #4
0
ファイル: base.php プロジェクト: prox91/joomla-dev
 /**
  * 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;
     }
 }
コード例 #5
0
 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;
         }
     }
 }
コード例 #6
0
ファイル: database.php プロジェクト: exntu/joomla-cms
 /**
  * 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();
 }
コード例 #7
0
ファイル: model.php プロジェクト: RustyIngles/sp4k_php
 public function __construct($state = null)
 {
     parent::__construct($state);
     $this->execute();
 }
コード例 #8
0
ファイル: default.php プロジェクト: rrgarcia-tiempodev/lendr
 function __construct()
 {
     parent::__construct();
 }