Gets/sets the format of the request.

@param  string      $format A format name.
@return string|self
19951
public function format($format = null)
    {
        if (func_num_args()) {
            return parent::format($format);
        }
        if ($this->_format === null) {
            $this->negotiate();
        }
        return $this->_format;
    }
535962
public function format($format)
    {
        $format = preg_replace_callback('/(?<!\\\\)[DlFM]/', array($this, '_translate'), $format);
        return $this->_date->format($format);
    }
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;
    }
611576
public function getLocale($format = self::UNDERSCORE)
    {
        $localization = strtolower($this->getLanguage());

        if (null != $this->getCountry()) {
            $country = strtolower($this->getCountry());
            $delimiter = '-';

            switch ($format) {
                case self::UNDERSCORE:
                    $delimiter = '_';
                    break;
                case self::ISO6391:
                    $country = strtoupper($country);
                    break;
                case self::LCID:
                    $delimiter = '_';
                    $country = strtoupper($country);
                    break;
            }

            $localization .= $delimiter . $country;
        }

        return $localization;
    }
1227770
public function getFormatPattern($format)
    {

        switch ($format) {
            case self::DATETIME_FORMAT_LONG:
                $pattern = $this->translator->translate('Intl_Format_DateTime_Long');
                break;

            case self::DATETIME_FORMAT_SHORT:
                $pattern = $this->translator->translate('Intl_Format_DateTime_Short');
                break;

            case self::DATE_FORMAT_LONG:
                $pattern = $this->translator->translate('Intl_Format_Date_Long');
                break;

            case self::DATE_FORMAT_DAY_MONTH:
                $pattern = $this->translator->translate('Intl_Format_Date_Day_Month');
                break;

            case self::DATE_FORMAT_SHORT:
                $pattern = $this->translator->translate('Intl_Format_Date_Short');
                break;

            case self::DATE_FORMAT_MONTH_SHORT:
                $pattern = $this->translator->translate('Intl_Format_Month_Short');
                break;

            case self::DATE_FORMAT_MONTH_LONG:
                $pattern = $this->translator->translate('Intl_Format_Month_Long');
                break;

            case self::DATE_FORMAT_YEAR:
                $pattern = $this->translator->translate('Intl_Format_Year');
                break;

            case self::TIME_FORMAT:
                $pattern = $this->translator->translate('Intl_Format_Time');
                break;

            default:
                $pattern = $format;
        }

        if (strpos($pattern, '{time}') !== false) {
            $pattern = str_replace('{time}', $this->getTimeFormat(), $pattern);
        }

        return $pattern;
    }
76974
public function getMetaDateFormatted($format = null)
    {
        if ($this->owner->hasMetaDate()) {
            return $this->owner->getMetaDate()->Format($format ? $format : $this->owner->getMetaDateFormat());
        }
    }
710825
public function toString($format = null) {
        // If no format is defined, use the one specified in the current class
        if (!isset($format)) {
            $format = self::DATETIME_FORMAT;
        }

        return $this->_dateTime->format($format) . '.' . self::_formatMilliseconds($this->_milliseconds);
    }
453224
public function setApiQueryStringRequestFormat($format)
    {
        $this->apiQueryStringRequestFormat = $format;
        return $this->apiQueryStringRequestFormat === $format ? true : false;
    }
505992
public function setFormat($format)
    {
        $this->_format = $format;
        // Use formatter content type if exists
        if (isset($this->contentTypes[$this->_format])) {
            $this->ci->output
                ->set_content_type($this->contentTypes[$this->_format]);
        }

        return $this;
    }
716303
public function getFormatWebPath($format = null)
    {
        if (!$format = $format ?: $this->defaultFormat) {
            return $this->getWebPath();
        }

        return ($formattedImage = $this->getFormattedImage($format))
            ? $formattedImage->getWebPath()
            : $this->getWebPath()
        ;
    }
299595
public function setFormat($format) {
        if ($format === null) {
            $format = [];
        } else if ( ! is_array($format)) {
            $format = [$format];
        }

        $this->format = $format;

        return $this;
    }
1146945
public function generate($format = 'php')
    {
        // Check if the generator for this format exists
        $method = 'generate'.ucfirst($format).'Helper';
        if (method_exists($this, $method)) {
            return $this->$method();
        }

        return $this->generatePhpHelper();
    }
1308292
public function getCreatedAt($format = 'Y-m-d H:i:s')
    {
        if ($this->createdAt instanceof \DateTime && $format !== null) {
            return $this->createdAt->format($format);
        }

        return $this->createdAt;
    }
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;
    }
454189
public function setFormat($format) {
        $upperFormat = strtoupper($format);
        $this->searchParams->config->searchFormat = array_search($upperFormat, SearchFormat::$__names);
    }
776327
public function setFormats($formats)
    {
        foreach ($formats as $type => $format) {
            $this->setFormat($type, $format);
        }

        return $this;
    }
93064
public function getMimeType($format) {

		if (NULL === static::$formats) {
			static::initializeFormats();
		}

		return isset(static::$formats[$format]) ? static::$formats[$format][0] : NULL;

	}