count() public method

Counts objects in collection
public count ( callable $cb, array $p = [] ) : void
$cb callable Callback called when response received
$p array Hash of properties (offset, limit, opts, where, col)
return void
コード例 #1
0
ファイル: Accounts.php プロジェクト: kakserpom/WakePHP
 /**
  * @param $ip
  * @param callable $cb
  */
 public function getRecentSignupsFromIP($ip, $cb)
 {
     $this->accounts->count($cb, array('where' => array('ip' => (string) $ip, 'regdate' => array('$gt' => time() - 3600))));
 }