We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I added some more helpers to the Result class, like this:
Result
public function getFirstDoc() { $row = $this->getFirstRow(); return $row ? $row['doc'] : false; } public function getDocs() { return array_map(function($row) { return $row['doc']; }, $this->getRows()); } public function isEmpty() { return !(bool)$this->data['rows']; } public function isError() { return array_key_exists('error', $this->data); } public function isNotFound() { return $this->isError() && ($this->data['error'] == 'not_found'); }
Maybe these could be usefull in your Result class.
The text was updated successfully, but these errors were encountered:
The result class isn't really finished yet. Submit a PR, i will review and merge it :)
Sorry, something went wrong.
No branches or pull requests
I added some more helpers to the
Result
class, like this:Maybe these could be usefull in your Result class.
The text was updated successfully, but these errors were encountered: