private function prepareFormat($value, $format)
    {
        if (!is_array($format)) {
            return [$format, [$value]];
        }
        if (!isset($format[0])) {
            throw new InvalidParamException('The $format array must contain at least one element.');
        }
        $f = $format[0];
        $format[0] = $value;
        $params = $format;
        $format = $f;
        return [$format, $params];
    }
private function prepareFormat($value, $format)
    {
        if (!is_array($format)) {
            return [$format, [$value]];
        }
        if (!isset($format[0])) {
            throw new InvalidParamException('The $format array must contain at least one element.');
        }
        $f = $format[0];
        $format[0] = $value;
        $params = $format;
        $format = $f;
        return [$format, $params];
    }
private function prepareFormat ( $ value , $ format ) { if ( ! is_array ( $ format ) ) { return [ $ format , [ $ value ] ] ; } if ( ! isset ( $ format [ 0 ] ) ) { throw new InvalidParamException ( 'The $format array must contain at least one element.' ) ; } $ f = $ format [ 0 ] ; $ format [ 0 ] = $ value ; $ params = $ format ; $ format = $ f ; return [ $ format , $ params ] ; }
Prepares format or filter methods params.
@param mixed $value
@param string|array $format
@return array two values: $format and $params
Prepares format or filter methods params .