Commit Graph

9 Commits

Author SHA1 Message Date
Daniele Alessandri 2d53db7b9b Rework PR to use "goto" instead of a "while ... do" loop. 2014-07-07 10:50:17 +02:00
Gwilym Evans f05cb1b46d use a loop instead of recursion in CursorBasedIterator
servers with large sets of keys will cause memory and stack exhaustion if recursion is used
2014-06-26 12:56:00 +10:00
Daniele Alessandri 25cd43033f Fix some errors in phpdocs.
[ci skip]
2013-12-22 12:12:49 +01:00
Daniele Alessandri 02e43143d3 Run php-cs against codebase. 2013-12-17 12:53:36 +01:00
Daniele Alessandri 0f34f41ccf Fix and reword some exception messages. 2013-12-16 15:13:18 +01:00
Daniele Alessandri 59b5658cf5 Big batch of phpdoc improvements and minor code styling fixes. 2013-12-10 19:21:52 +01:00
Daniele Alessandri ee9e09aa07 Rename protected member. 2013-11-07 14:45:09 +01:00
Daniele Alessandri b2db97d983 Tweak phpdocs for the abstract cursor-based iterator. 2013-11-07 12:10:04 +01:00
Daniele Alessandri 5ad00774e1 Rename for the last time all the iterator classes.
We are experimenting with a new approach at naming classes using less
redundant names by leveraging the containing namespace. The PHP "use"
directive is not limited to class names but can be used to import the
whole namespace, which means you can do something like this:

  use Predis\Collection\Iterator;
  // ...
  foreach (new Iterator\Keyspace($client) as $key) {
  	// ...
  }

Alternatively you can always rely on "use ... as ..." to import one of
the classes by giving it a more meaningful name in the context of the
root namespace:

  use Predis\Collection\Iterator\Keyspace as KeyspaceIterator;
  // ...
  foreach (new KeyspaceIterator($client) as $key) {
  	// ...
  }

In this specific case we chose to apply the -Key postfix to classes
iterating Redis keys to be more explicit about the fact that those
iterators does not work on local in-memory collections, but fetch
items from a key stored on a remote Redis server.
2013-11-07 12:09:59 +01:00