connection->getType()) { case DatabaseType::MYSQL: $query = new Builder($this->connection); $sql = $query->select(...static::$columns) ->from($this->connection->prefix . static::$table) ->where(static::$columns[0], 'in', $columns) ->toSql(); $sth = $this->connection->con->prepare($sql); $sth->execute(); $options = $sth->fetchAll(\PDO::FETCH_KEY_PAIR); $this->setOptions($options); break; } return $options; } catch (\PDOException $e) { // todo does it mean that the recognition isn't here but at the place where the new happens? throw DatabaseExceptionFactory::create($e); } } /** * Set option by key. * * @param string[] $options Column values for filtering * @param bool $store Save this Setting immediately to database * * @return mixed Option value * * @since 1.0.0 */ public function set(array $options, bool $store = false) /* : void */ { $this->setOptions($options); if ($store) { // save to db } } }