setStatement($statement); } protected PDOStatement $statement; public function setStatement(PDOStatement $statement): RSInterface { $this->statement = $statement; return $this; } public function getStatement(): PDOStatement { return $this->statement; } public function execute(array $values): RSInterface { $this->getStatement()->execute($values); return $this; } public function getAsArray(): array { return $this->getStatement()->fetchAll(PDO::FETCH_ASSOC); } public function getAsObject(): array { return $this->getStatement()->fetchAll(PDO::FETCH_OBJ); } public function getFirst(): mixed { return $this->getStatement()->fetch(PDO::FETCH_OBJ); } }