public static function findOne($where = array(), $order = array())
    {
        // try to fetch a model from database
        if ($dataModel = self::select(array('*'), $where, $order, 1)) {

            // hydrate new model instance with fetched data
            $model = new static();
            $model->hydrate($dataModel);

            return $model;
        } else {
            return null;
        }
    }
public static function findOne($where = array(), $order = array())
    {
        // try to fetch a model from database
        if ($dataModel = self::select(array('*'), $where, $order, 1)) {

            // hydrate new model instance with fetched data
            $model = new static();
            $model->hydrate($dataModel);

            return $model;
        } else {
            return null;
        }
    }
public static function findOne ( $ where = array ( ) , $ order = array ( ) ) { // try to fetch a model from database if ( $ dataModel = self :: select ( array ( '*' ) , $ where , $ order , 1 ) ) { // hydrate new model instance with fetched data $ model = new static ( ) ; $ model -> hydrate ( $ dataModel ) ; return $ model ; } else { return null ; } }
Find one model from 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')

@return static
Find one model from criteria