public static function find($where = array(), $order = array(), $limitStart = null, $limitEnd = null)
    {
        // validate model PHP structure if necessary
        self :: _validateModel();

        // build a query helper with parameters
        $queryHelper = static::buildSelectQuery(array("*"), $where, $order, $limitStart, $limitEnd);

        // create a collection instance for called model with model datasource and custom created queryhelper
        return new Collection(static::$_dataSource, $queryHelper, get_called_class());
    }
public static function find($where = array(), $order = array(), $limitStart = null, $limitEnd = null)
    {
        // validate model PHP structure if necessary
        self :: _validateModel();

        // build a query helper with parameters
        $queryHelper = static::buildSelectQuery(array("*"), $where, $order, $limitStart, $limitEnd);

        // create a collection instance for called model with model datasource and custom created queryhelper
        return new Collection(static::$_dataSource, $queryHelper, get_called_class());
    }
public static function find ( $ where = array ( ) , $ order = array ( ) , $ limitStart = null , $ limitEnd = null ) { // validate model PHP structure if necessary self :: _validateModel ( ) ; // build a query helper with parameters $ queryHelper = static :: buildSelectQuery ( array ( "*" ) , $ where , $ order , $ limitStart , $ limitEnd ) ; // create a collection instance for called model with model datasource and custom created queryhelper return new Collection ( static :: $ _dataSource , $ queryHelper , get_called_class ( ) ) ; }
Return model collection fetched from database with criteria

@param array $where      - associative array ex:
simple criteria        array('idMarque' => 1)
custom operator        array('idMarque' => array('operator' => '<=','value' => ''))
raw SQL                array('idMarque' => array('IN (5,6,4)'))
@param array $order      - associative array ex:array('libMarque'=>'ASC')
@param int   $limitStart - int
@param int   $limitEnd   - int

@return Collection
Return model collection fetched from database with criteria