public static function make($value, $defaultOrder = self::ORDER_ASCENDING)
    {
        $value = static::prepareValue($value);
        list($field, $order) = static::parseFieldAndOrder($value, $defaultOrder);

        static::validateFieldName($field);

        return new static($field, $order);
    }
public static function make($value, $defaultOrder = self::ORDER_ASCENDING)
    {
        $value = static::prepareValue($value);
        list($field, $order) = static::parseFieldAndOrder($value, $defaultOrder);

        static::validateFieldName($field);

        return new static($field, $order);
    }
public static function make ( $ value , $ defaultOrder = self :: ORDER_ASCENDING ) { $ value = static :: prepareValue ( $ value ) ; list ( $ field , $ order ) = static :: parseFieldAndOrder ( $ value , $ defaultOrder ) ; static :: validateFieldName ( $ field ) ; return new static ( $ field , $ order ) ; }
Creates criterion object for given value.

@param string $value query value
@param string $defaultOrder default sort order if order is not given explicitly in query

@return Criterion
Creates criterion object for given value .