/** * Init the model and set up the database instance * Optionally load data * * @param object $db Database instance * @param array $data Optional data to load */ public function __construct($db, array $data = array()) { $this->setDb($db); parent::__construct($data); }
/** * Init the object with the datasource and optional data * * @param \Psecio\Gatekeeper\DataSource $db Datasource instance * @param array $data Optional data to populate in model */ public function __construct(\Psecio\Gatekeeper\DataSource $db, array $data = array()) { $this->setDb($db); parent::__construct($data); }