kakserpom / phpdaemon

Asynchronous server-side framework for network applications implemented in PHP using libevent
http://daemon.io/
GNU Lesser General Public License v3.0
1.53k stars 231 forks source link

Could not to get all MongoDb collection items #36

Closed earthperson closed 12 years ago

earthperson commented 14 years ago

I do so, then plan to get all collection items: $this->db->objects->find(function($cursor) { foreach($cursor->items as $k => $object) { // do something.... unset($cursor->items[$k]); } if (!$cursor->finished) {$cursor->getMore();} else { // trigger my ather code there .... $cursor->destroy(); } }); But this does not work properly: PHP Notice: Undefined property: stdClass::$callback in /usr/local/phpdaemon/app-clients/MongoClient.php on line 1128 PHP Warning: call_user_func() expects parameter 1 to be a valid callback, no array or string given in /usr/local/phpdaemon/app-clients/MongoClient.php on line 1128 And only some part of the collection items was fetched.

kakserpom commented 12 years ago

Not actual.