Skip to content

Commit

Permalink
PDOStatementProxy->setFetchMode() to match that of PDOStatement (#109)
Browse files Browse the repository at this point in the history
* PDOStatementProxy->setFetchMode() to match that of PDOStatement

Co-authored-by: sy-records <52o@qq52o.cn>
  • Loading branch information
yespire and sy-records authored Jul 4, 2021
1 parent e07037b commit 2bf5423
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/core/Database/PDOStatementProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,11 @@ public function setAttribute(int $attribute, $value): bool
return $this->__object->setAttribute($attribute, $value);
}

public function setFetchMode(int $mode, $classNameObject = null, array $ctorarfg = []): bool
public function setFetchMode(int $mode, ...$args): bool
{
$this->setFetchModeContext = [$mode, $classNameObject, $ctorarfg];
if (!isset($classNameObject)) {
return $this->__object->setFetchMode($mode);
}
return $this->__object->setFetchMode($mode, $classNameObject, $ctorarfg);
array_unshift($args, $mode);
$this->setFetchModeContext = $args;
return $this->__object->setFetchMode(...$args);
}

public function bindParam($parameter, &$variable, $data_type = PDO::PARAM_STR, $length = null, $driver_options = null): bool
Expand Down

0 comments on commit 2bf5423

Please sign in to comment.