find() public method

Finds objects in collection
public find ( callable $cb, array $p = [] ) : void
$cb callable Callback called when response received
$p array Hash of properties (offset, limit, opts, tailable, where, col, fields, sort, hint, explain, snapshot, orderby, parse_oplog)
return void
コード例 #1
0
 /**
  * @param string $user_id
  * @param int $limit
  * @param int $offset
  * @param array $fields
  * @param callable $cb
  */
 public function findWaiting($user_id, $limit, $offset, $fields, $cb = null)
 {
     $this->externalAuthTokens->find($cb, ['limit' => -$limit, 'offset' => $offset, 'fields' => $fields, 'where' => ['uid' => $user_id, 'status' => ['$in' => ['new', 'delayed']]]]);
 }
コード例 #2
0
ファイル: Accounts.php プロジェクト: kakserpom/WakePHP
 /**
  * @param callable $cb
  * @param array $cond
  */
 public function findAccounts($cb, $cond = array())
 {
     $this->accounts->find($cb, $cond);
 }
コード例 #3
0
ファイル: Blocks.php プロジェクト: kakserpom/WakePHP
 /**
  * @param $names
  * @param callable $cb
  */
 public function getBlocksByNames($names, $cb)
 {
     $this->blocks->find($cb, ['limit' => -100, 'where' => array('name' => array('$in' => $names))]);
 }