count() public method

This method accepts a second argument to modify the count-query. A third argument can be used to provide bindings for the SQL snippet.
public count ( string $type, string $addSQL = '', array $bindings = [] ) : integer
$type string type of bean we are looking for
$addSQL string additional SQL snippet
$bindings array parameters to bind to SQL
return integer
示例#1
0
 /**
  * Counts the number of beans of type $type.
  * This method accepts a second argument to modify the count-query.
  * A third argument can be used to provide bindings for the SQL snippet.
  *
  * @param string $type     type of bean we are looking for
  * @param string $addSQL   additional SQL snippet
  * @param array  $bindings parameters to bind to SQL
  *
  * @return integer
  */
 public function count($type, $addSQL = '', $bindings = array())
 {
     return $this->repository->count($type, $addSQL, $bindings);
 }