/** * Sets database * * @param string $modelClass * @param int $fetchType One of constants */ public function __construct($modelClass = null, $fetchType = null) { if (static::$_database == null) { static::$_database = $this->_getDatabases(); } parent::__construct($modelClass, $fetchType); }