public function __construct() { $this->mysql = new \tables\MysqlCredentials(); $this->mysqlRow = $this->mysql->find(); if ($this->mysqlRow) { $this->setAttributes(['dsn' => $this->mysqlRow['mysql_dsn'], 'username' => $this->mysqlRow['mysql_username'], 'password' => $this->mysqlRow['mysql_password'], 'options' => $this->mysqlRow['mysql_options']]); } parent::__construct(); }
/** * Returns prefix for model * * @param modelInterfaces\Model|string $model * @return string */ public function getModelPrefix($model) { return $model instanceof modelInterfaces\Model ? $model->getLinkPrefix() : \KZ\Model::getModelPrefix($model); }