Returns the display name for this file set (localized and escaped accordingly to $format).

@param string $format

@return string
15965
public function getFileSetDisplayName($format = 'html')
    {
        $value = tc('FileSetName', $this->getFileSetName());
        switch ($format) {
            case 'html':
                return h($value);
            case 'text':
            default:
            return $value;
        }
    }
462831
public function format($format = null)
    {
        if (!$format) {
            $format = $this->getFormat();
        }

        return parent::format($format ?: static::$toStringFormat);
    }
759755
public function getFormatMimeType($format)
    {
        $format = $this->normalizeFormat($format);
        $result = '';
        switch ($format) {
            case static::FORMAT_PNG:
            case static::FORMAT_JPEG:
            case static::FORMAT_GIF:
            case static::FORMAT_XBM:
                $result = 'image/' . $format;
                break;
            case static::FORMAT_WBMP:
                $result = 'image/vnd.wap.wbmp';
                break;
        }

        return $result;
    }
839036
final public function format($format)
    {
        if(is_null($this->value)) {
            return null;
        } else {
            return $this->value->format($format);
        }
    }
1033982
protected function updatedAgo(string $format): string
    {
        return '<time class="updated entry-date" itemprop="dateModified" datetime="'.
            \esc_attr(\get_the_modified_time(
                'Y-m-d\TH:i:sO',
                '',
                $this->post->get()
            )).
            '">'.$this->post->time('updated')->render($format)
        .'</time>
        </span>';
    }
623018
public function getByFormat($format)
    {
        foreach ($this->getExporters() as $exporter) {
            if ($exporter->support($format)) {
                return $exporter;
            }
        }

        throw new \RuntimeException(sprintf('No exporter found for "%s" format.', $format));
    }
1054950
function getIssuerDN($format = FILE_X509_DN_ARRAY)
    {
        switch (true) {
            case !isset($this->currentCert) || !is_array($this->currentCert):
                break;
            case isset($this->currentCert['tbsCertificate']):
                return $this->getDN($format, $this->currentCert['tbsCertificate']['issuer']);
            case isset($this->currentCert['tbsCertList']):
                return $this->getDN($format, $this->currentCert['tbsCertList']['issuer']);
        }

        return false;
    }
140753
private function headersFromFormat($format)
	{
		$type = gettype($format);
		if($type === 'array')
		{
			$headers = $format;
		}
		else if($type === 'string')
		{
			$headers = array();
			switch ($format) 
			{
				case 'json':
					$contentType = 'application/json';
					break;
				case 'jsonp':
					$contentType = 'application/javascript';
					break;
				default:
					$contentType = 'text/plain';
					break;
			}
			$headers['Content-Type'] = $contentType;
		}
		return $headers;
	}
58036
public function formatTZ($format)
    {
        $out = '';

        switch ($format) {
            case self::TZ_ID:
                $out = $this->format('e');
                break;

            case self::TZ_SHORT:
            case self::TZ_LONG:
                $id = $this->format('e');
                $abbreviations = self::getTimeZoneAbbreviations();
                if (
                    isset($abbreviations[$id]) &&
                    isset($abbreviations[$id]['st'])
                ) {
                    $out = $abbreviations[$id]['st'];
                }
                break;

            case self::TZ_DST_SHORT:
            case self::TZ_DST_LONG:
                $id = $this->format('e');
                $abbreviations = self::getTimeZoneAbbreviations();
                if (isset($abbreviations[$id])) {
                    if (isset($abbreviations[$id]['dt'])) {
                        $out = $abbreviations[$id]['dt'];
                    } else {
                        $out = $abbreviations[$id]['st'];
                    }
                }
                break;

            case self::TZ_CURRENT_SHORT:
            case self::TZ_CURRENT_LONG:
                $out = $this->format('T');
                break;

            case self::TZ_COMBINED:
                $out = array();
                $id = $this->format('e');
                $abbreviations = self::getTimeZoneAbbreviations();
                if (isset($abbreviations[$id])) {
                    if (isset($abbreviations[$id]['st'])) {
                        $out[] = $abbreviations[$id]['st'];
                    }
                    if (isset($abbreviations[$id]['dt'])) {
                        $out[] = $abbreviations[$id]['dt'];
                    }
                }
                $out = implode('/', $out);
                break;
        }

        return $out;
    }
1217541
public function format($format)
    {
        $format = str_replace('u', sprintf('%06d', $this->microseconds), $format);

        return parent::format($format);
    }
116598
public function toString(string $format = null): string
    {
        if (isset($format)) {
            return (new DateTime('@0'))
                ->diff(new DateTime('@'.round($this->time, 0)))
                ->format($format);
        }
        return $this->__toString();
    }
396598
public function format($format = self::FORMAT_COMPLETE)
    {
        if (!$this->hasValidFormat()) {
            return false;
        }
        switch ($format) {
            case static::FORMAT_COMPLETE:
                return $this->join(
                    number_format($this->number, 0, null, "."),
                    $this->vn
                );
                break;

            case static::FORMAT_WITH_DASH:
                return $this->join($this->number, $this->vn);
                break;
        }
        return $this->number . $this->vn;
    }
1255647
public static function getOutputFormatter( $format )
    {
        if ( !self::isRegisteredFormatter( $format ) )
        {
            $format = eZINI::instance( 'template.ini' )->variable( 'AttributeOperator', 'DefaultFormatter' );
        }

        if ( !( self::$formatter instanceof ezpAttributeOperatorFormatterInterface ) || $format != self::$format )
        {
            self::$formatter = self::createFormatter( $format );
            self::$format = $format;
        }

        return self::$formatter;
    }
278431
public function getFormatPattern($format)
    {
        switch ($format) {
            case self::DATETIME_FORMAT_LONG:
                return 'EEEE, MMMM d, y HH:mm:ss';

            case self::DATETIME_FORMAT_SHORT:
                return 'MMM d, y HH:mm:ss';

            case self::DATE_FORMAT_LONG:
                return 'EEEE, MMMM d, y';

            case self::DATE_FORMAT_DAY_MONTH:
                return 'E, MMM d';

            case self::DATE_FORMAT_SHORT:
                return 'MMM d, y';

            case self::DATE_FORMAT_MONTH_SHORT:
                return 'MMM y';

            case self::DATE_FORMAT_MONTH_LONG:
                return 'MMMM y';

            case self::DATE_FORMAT_YEAR:
                return 'y';

            case self::TIME_FORMAT:
                return 'HH:mm:ss';
        }

        return $format;
    }
905167
public function getDateTimeFormat(string $format='Y-m-d H:i:s')
    {
        $this->setDateTimeZone()->setDateTime();

        return $this->dateTime->format($format);
    }
430347
public function getCode($format)
    {
        foreach ($this->codes as $code) {
            if ($code->getFormat() == $format) {
                return $code;
            }
        }
    }
1099052
public function getFormatOption($format, $options = [])
  {
    $format = isset($this->format[$format]) ?  $this->format[$format] : Format::create($format, $options);
    if (isset($options['output']) && empty($format->getOutput())) {
      $format->setOutput($options['output']);
    }
    return $format;
  }