public static function id($id)
    {
        $class = get_called_class();

        if ($class::$customIdType !== true) {
            if ($id  && strlen($id) == 24 ) {
                $id = new \MongoId($id);
            }
        }

        return self::one(array("_id" => $id));

    }
public static function id($id)
    {
        $class = get_called_class();

        if ($class::$customIdType !== true) {
            if ($id  && strlen($id) == 24 ) {
                $id = new \MongoId($id);
            }
        }

        return self::one(array("_id" => $id));

    }
public static function id ( $ id ) { $ class = get_called_class ( ) ; if ( $ class :: $ customIdType !== true ) { if ( $ id && strlen ( $ id ) == 24 ) { $ id = new \ MongoId ( $ id ) ; } } return self :: one ( array ( "_id" => $ id ) ) ; }
Retrieve a record by MongoId

@param mixed $id id

@return Model
Retrieve a record by MongoId