Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDOStatementProxy->setFetchMode() to match that of PDOStatement #109

Merged
merged 12 commits into from
Jul 4, 2021
9 changes: 3 additions & 6 deletions src/core/Database/PDOStatementProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,10 @@ 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): bool
{
$this->setFetchModeContext = [$mode, $classNameObject, $ctorarfg];
if (!isset($classNameObject)) {
return $this->__object->setFetchMode($mode);
}
return $this->__object->setFetchMode($mode, $classNameObject, $ctorarfg);
$this->setFetchModeContext = func_get_args();
return $this->__object->setFetchMode(...$this->setFetchModeContext);
}

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