Ejemplo n.º 1
0
 /**
  *
  *
  * @access	public
  * @return void
  */
 public function __construct()
 {
     $app = \Cobalt\Container::fetch('app');
     parent::__construct();
     $this->getListLimits();
     $this->view = $app->input->get('view');
 }
 /**
  * Instantiate the model.
  *
  * @param   DatabaseDriver  $db     The database adapter.
  * @param   Registry        $state  The model state.
  *
  * @since   1.0
  */
 public function __construct(DatabaseDriver $db, Registry $state = null)
 {
     $this->db = $db;
     parent::__construct($state);
 }
Ejemplo n.º 3
0
 /**
  * Instantiate the model.
  *
  * @param   Registry  $state  The model state.
  *
  * @since   1.0
  */
 public function __construct(Registry $state = null)
 {
     parent::__construct($state);
     Text::setLanguage(\Cobalt\Container::fetch('app')->getLanguage());
 }
 /**
  * Tests the setState method.
  *
  * @return  void
  *
  * @covers  Joomla\Model\AbstractModel::getState
  * @covers  Joomla\Model\AbstractModel::setState
  * @since   1.0
  */
 public function testSetState()
 {
     $state = new Registry(array('foo' => 'bar'));
     $this->instance->setState($state);
     $this->assertSame($state, $this->instance->getState());
 }
Ejemplo n.º 5
0
 /**
  * Class constructor.
  *
  * Overrides the parent class to directly inject the Github connector.
  *
  * @param   Github    $github  A Github connector object.
  * @param   Registry  $state   The model state.
  *
  * @since   1.2
  */
 public function __construct(Github $github, Registry $state)
 {
     parent::__construct($state);
     $this->github = $github;
 }