Skip to content

Commit

Permalink
Make ResultsetInterface Countable
Browse files Browse the repository at this point in the history
  • Loading branch information
Bellardia committed Jul 10, 2023
1 parent 7597713 commit 38c1dd4
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 3 deletions.
1 change: 0 additions & 1 deletion ext/phalcon/mvc/model/resultset.zep.c

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions ext/phalcon/mvc/model/resultsetinterface.zep.c

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions ext/phalcon/mvc/model/resultsetinterface.zep.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion phalcon/mvc/model/resultset.zep
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ use Phalcon\Mvc\Model\ResultsetInterface;
* </code>
*/
abstract class Resultset
implements ResultsetInterface, \Iterator, \SeekableIterator, \Countable, \ArrayAccess, \JsonSerializable
implements ResultsetInterface, \Iterator, \SeekableIterator, \ArrayAccess, \JsonSerializable
{

/**
Expand Down
7 changes: 6 additions & 1 deletion phalcon/mvc/model/resultsetinterface.zep
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace Phalcon\Mvc\Model;
* Interface for Phalcon\Mvc\Model\Resultset
*
*/
interface ResultsetInterface
interface ResultsetInterface extends \Countable
{

/**
Expand Down Expand Up @@ -69,4 +69,9 @@ interface ResultsetInterface
* it could consume more memory than currently it does.
*/
public function toArray() -> array;

/**
* Counts how many rows are in the resultset
*/
public function count() -> int;
}

0 comments on commit 38c1dd4

Please sign in to comment.