Email format

@deprecated 3.4.0 Use setEmailFormat()/getEmailFormat() instead.
@param string|null $format Formatting string.
@return string|$this
@throws \InvalidArgumentException
335087
public function emailFormat($format = null)
    {
        deprecationWarning('Email::emailFormat() is deprecated. Use Email::setEmailFormat() or Email::getEmailFormat() instead.');

        if ($format === null) {
            return $this->getEmailFormat();
        }

        return $this->setEmailFormat($format);
    }
306718
protected function setFormat($format = null)
    {
        if ($format == '' && $this->image instanceof Image) {
            $format = $this->image->mime;
        }

        $this->format = $format ? $format : 'jpg';

        return $this;
    }
994203
public function format(string $format) : self
    {
        if (! in_array($format, self::VALID_FORMATS)) {
            throw new Exception('Invalid format provided to path.');
        }

        $this->format = $format;

        return $this;
    }
1099597
public function setFormat($format)
    {
        $this->format = (string) $format;

        foreach ($this->items as $time) {

            $time->setFormat($format);
        }

        return $this;
    }
205288
public function getFormatInstance($format = null)
    {
        $format = $format ?: $this->format;

        if (!($format instanceof FormatInterface)) {
            if (!isset($this->formats[$format])) {
                $event = new NewFormatEvent($this, new $format($this));
                $this->trigger($event);
                $this->formats[$format] = $event->getFormat();
            }

            $format = $this->formats[$format];
        }

        return $format;
    }
523340
public static function setOutputFormat($format)
    {
        $self = Debugger::getInstance();

        if (!isset($self->_templates[$format])) {
            throw new InvalidArgumentException('Invalid Debugger output format.');
        }
        $self->_outputFormat = $format;
    }
1284254
public function format($format)
    {
        $string = str_replace(' ', '', $this->value());
        for ($i = 0; $i < strlen($string); $i++) {
            $pos = strpos($format, '#');

            // verificar se string eh maior que a qtdade de #.
            if ($pos === false) {
                break;
            }
            $format[$pos] = $string[$i];
        }

        // verificar se sobrou # para trocar
        if (strpos($format, '#') !== false) {
            $format = $this->value();
        }

        $this->value = $format;

        return $this;
    }
242438
public function setTimeFormat($format) {
        if (is_string($format)) {
            $this->timeFormatter = function ($t) use ($format) {
                return strftime($format, $t);
            };
        } else {
            $this->timeFormatter = $format;
        }

        return $this;
    }
728259
public function format($format = '')
    {
        if ($this->isHollow()) {
            $format = $this->format;
        } else {
            $format = $format ?: $this->format;
        }

        return parent::format($format);
    }
462831
public function format($format = null)
    {
        if (!$format) {
            $format = $this->getFormat();
        }

        return parent::format($format ?: static::$toStringFormat);
    }
19951
public function format($format = null)
    {
        if (func_num_args()) {
            return parent::format($format);
        }
        if ($this->_format === null) {
            $this->negotiate();
        }
        return $this->_format;
    }
824489
public function setNotificationAttrFormat($format = "normalized") {
        if(!isset($this->_subscription->notification)){
            $this->_subscription->notification = (object) [];
        }

        $possibleValues = ["normalized", "keyValues", "values"];
        if (!in_array($possibleValues, $format)) {
            throw new \Exception("Not supported format");
        }
        $this->_subscription->notification->attrsFormat = $format;
        return $this;
    }
1163438
public static function fromString(string $format)
    {
        if (preg_match('/^(([^-]|--)+)-(([^-]|--)+)-(([^-]|--)+)\.(svg|png|gif|jpg)$/', $format, $match) === false && (7 != count($match))) {
            throw new InvalidArgumentException('The given format string is invalid: '.$format);
        }

        $subject = $match[1];
        $status = $match[3];
        $color = $match[5];
        $format = $match[7];

        return new self($subject, $status, $color, $format);
    }
388149
public function setFormat($format)
    {
        if($format)
        {
            if(!isset(static::$_formats[$format])) {
                throw new \UnexpectedValueException('Unregistered format: "' . $format . '" given.');
            }

            $this->_format = $format;
        }

        return $this;
    }
812679
public function setFormat($format)
    {
        if (empty($format) || !is_string($format)) {

            throw new Zend_Validate_Exception("A postcode-format string has to be given for validation");
        }

        if ($format[0] !== '/') {
            $format = '/^' . $format;
        }

        if ($format[strlen($format) - 1] !== '/') {
            $format .= '$/';
        }

        $this->_format = $format;
        return $this;
    }
1168831
public function get($format = null)
    {
        if ( ! is_null($format) )
            $this->setFormat($format);

        ob_start();
        call_user_func($this->getFunctionName(), $this->getImage());

        return ob_get_clean();
    }
326292
public function bodyFormat(string $format): self
    {
        return tap($this, function ($request) use ($format) {
            $this->bodyFormat = $format;
        });
    }