Fireguard\Report\Exporters\AbstractPhantomExporter::setFormat PHP Method

setFormat() public method

public setFormat ( string $format ) : AbstractPhantomExporter
$format string
return AbstractPhantomExporter
    public function setFormat($format)
    {
        if (in_array($format, $this->validFormats)) {
            $this->config['page']['format'] = $format;
        }
        return $this;
    }

Usage Example

Example #1
0
 /**
  * @param string $format
  * @return AbstractPhantomExporter
  */
 public function setFormat($format)
 {
     parent::setFormat($format);
     $this->extension = '.' . strtolower($this->getFormat());
     return $this;
 }