find() публичный Метод

Conditions need to take form: array( 'PROPERTY' => array( POSSIBLE VALUES... 'John', 'Steve' ) 'PROPERTY' => array( POSSIBLE VALUES... ) ); All conditions are glued together using the AND-operator, while all value lists are glued using IN-operators thus acting as OR-conditions. Note that you can use property names; the columns will be extracted using the appropriate bean formatter.
public find ( string $type, array $conditions = [], $sql = NULL, array $bindings = [] ) : array
$type string type of beans you are looking for
$conditions array list of conditions
$bindings array whether you prefer to use a WHERE clause or not (TRUE = not)
Результат array
Пример #1
0
 /**
  * Searches the database for a bean that matches conditions $conditions and sql $addSQL
  * and returns an array containing all the beans that have been found.
  *
  * Conditions need to take form:
  *
  * <code>
  * array(
  *    'PROPERTY' => array( POSSIBLE VALUES... 'John', 'Steve' )
  *    'PROPERTY' => array( POSSIBLE VALUES... )
  * );
  * </code>
  *
  * All conditions are glued together using the AND-operator, while all value lists
  * are glued using IN-operators thus acting as OR-conditions.
  *
  * Note that you can use property names; the columns will be extracted using the
  * appropriate bean formatter.
  *
  * @param string $type       type of beans you are looking for
  * @param array  $conditions list of conditions
  * @param string $addSQL     SQL to be used in query
  * @param array  $bindings   a list of values to bind to query parameters
  *
  * @return array
  */
 public function find($type, $conditions = array(), $sql = NULL, $bindings = array())
 {
     return $this->repository->find($type, $conditions, $sql, $bindings);
 }