public function setFormat($format)
    {
        if ($format) {
            $format = strtolower($format);

            if (!in_array($format, static::$validFormats)) {
                throw new Exception("Format {$format} is not supported");
            }

            $this->format = $format;

            if (!$this->suffix) {
                $this->setSuffix(".{$format}");
            }
        }

        return $this;
    }
public function setFormat($format)
    {
        if ($format) {
            $format = strtolower($format);

            if (!in_array($format, static::$validFormats)) {
                throw new Exception("Format {$format} is not supported");
            }

            $this->format = $format;

            if (!$this->suffix) {
                $this->setSuffix(".{$format}");
            }
        }

        return $this;
    }
public function setFormat ( $ format ) { if ( $ format ) { $ format = strtolower ( $ format ) ; if ( ! in_array ( $ format , static :: $ validFormats ) ) { throw new Exception ( "Format {$format} is not supported" ) ; } $ this -> format = $ format ; if ( ! $ this -> suffix ) { $ this -> setSuffix ( ".{$format}" ) ; } } return $ this ; }
Set format of the override files.

@param string $format

@return $this
@throws Exception
Set format of the override files .