public function setDefaultStringFormat($format)
    {
        $formats = static::getSupportedStringFormats();

        $format = strtoupper($format);
        if (!in_array($format, $formats)) {
            throw new InvalidArgumentException(sprintf('Given "%s" default string format is not supported. Only "%s" are valid string formats.', $format, implode(', ', $formats)));
        }

        $this->defaultStringFormat = $format;
    }
public function setDefaultStringFormat($format)
    {
        $formats = static::getSupportedStringFormats();

        $format = strtoupper($format);
        if (!in_array($format, $formats)) {
            throw new InvalidArgumentException(sprintf('Given "%s" default string format is not supported. Only "%s" are valid string formats.', $format, implode(', ', $formats)));
        }

        $this->defaultStringFormat = $format;
    }
public function setDefaultStringFormat ( $ format ) { $ formats = static :: getSupportedStringFormats ( ) ; $ format = strtoupper ( $ format ) ; if ( ! in_array ( $ format , $ formats ) ) { throw new InvalidArgumentException ( sprintf ( 'Given "%s" default string format is not supported. Only "%s" are valid string formats.' , $ format , implode ( ', ' , $ formats ) ) ) ; } $ this -> defaultStringFormat = $ format ; }
Sets the default string format for ActiveRecord objects in this table.
This parameter can be overridden at the table level.

Any of 'XML', 'YAML', 'JSON', or 'CSV'.

@param  string                   $format
@throws InvalidArgumentException
Sets the default string format for ActiveRecord objects in this table . This parameter can be overridden at the table level .