Exports form

@param string|FilledFormExportFormat $format
@return mixed
550213
public function export($format = FilledFormExportFormat::JSON)
    {
        if (! $format instanceof FilledFormExportFormat) {
            $format = new FilledFormExportFormat($format);
        }

        return static::query($this->client, [$this->filled_form_id, self::EXPORT], ['format' => $format->getValue()]);
    }
360472
public function getRenderer(string $format): ResultsRendererInterface
    {
        if ($format === self::FORMAT_CSV) {
            return new CsvResultsRenderer;
        }

        if ($format === self::FORMAT_JSON) {
            return new JsonResultsRenderer;
        }

        if ($format === self::FORMAT_TEXT) {
            return new ConsoleResultsRenderer;
        }

        throw new InvalidArgumentException('Invalid output format provided');
    }
953167
public function export(Builder $query, $format)
    {
        $method = 'to'.strtoupper($format);

        if (method_exists($this, $method)) {
            return call_user_func_array([$this, $method], [$query]);
        }

        if (method_exists($this->module, $method)) {
            return call_user_func_array([$this->module, $method], [$query]);
        }

        throw new Exception(sprintf('Don\'t know how to export to %s format.', $format));
    }
692792
protected function exportItem($locations, $exportFormat, $labelFormat)
    {
        $form = $this->dataConversionForm($locations, $exportFormat, $labelFormat);
        $item = null;
        if ($form) {
            $item = $this->doc->createElement('li');
            $item->appendChild($form);
        }

        return $item;
    }
950625
public function parseCustomFormat($format)
    {
        if (isset($this->parsedFormats[$format])) {
            return $this->parsedFormats[$format];
        }

        return $this->parsedFormats[$format] = $this->parseFormat($format);
    }
292055
protected function getFormat($format)
    {
        if ($format === false) {
            $format = 'none';
        }
        
        $types = [
            'none' => \IntlDateFormatter::NONE,
            'short' => \IntlDateFormatter::SHORT,
            'medium' => \IntlDateFormatter::MEDIUM,
            'long' => \IntlDateFormatter::LONG,
            'full' => \IntlDateFormatter::FULL
        ];
        
        return isset($types[$format]) ? $types[$format] : null;
    }
1131161
public function format($data, $format)
    {
        // Case handing. ex. json => Json
        $format = ucfirst(strtolower($format));
        $formatFunc = "format" . $format;
        // Use formatter if exists
        if (method_exists($this, $formatFunc)) {
            
            $data = $this->{$formatFunc}($data);
        } 
        elseif (is_array($data)) {
            // Use JSON while the Formatter not found and the data is array
            $data = $this->formatJson($data);
        }

        return $data;
    }
365072
public function render($format = 'd.m.Y H:i:s') {
		$output = $this->getContext() . ': ';
	    $date = $this->extractDateFromRevisionFile();
	    if ($date === null) {
	        $date = $this->extractDateFromSurfPath();
        }
	    if ($date === null) {
	        $date = new \DateTime('now');
        }

	    $output.= $date->format($format);
	    $output.= $this->extractRevisionFileContent();

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

        return $this->dateTime->format($format);
    }
748707
public static function getFormattedDate($date, $format)
    {
        if (StringUtils::isEmpty($date) || StringUtils::isEmpty($format)) {
            return null;
        }

        return date($format, strtotime($date));
    }
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;
    }
436339
public function format(): Format\Format
    {
        if (null === $this->format) {
            $this->format = Format\Format::fromJson($this);
        }

        return $this->format;
    }
647659
static public function getWriterByFormat( $format )
    {
        if ( !isset( self::$writeHandlers[$format] ) )
        {
            throw new ezcDbSchemaUnknownFormatException( $format, 'write' );
        }
        return self::$writeHandlers[$format];
    }
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;
	}
76974
public function getMetaDateFormatted($format = null)
    {
        if ($this->owner->hasMetaDate()) {
            return $this->owner->getMetaDate()->Format($format ? $format : $this->owner->getMetaDateFormat());
        }
    }
839036
final public function format($format)
    {
        if(is_null($this->value)) {
            return null;
        } else {
            return $this->value->format($format);
        }
    }
796163
public function export($formValues, $destination)
    {
        if (isset($formValues['filename'], $formValues['resource'])) {
            $class = new core_kernel_classes_Class($formValues['resource']);
            $adapter = new tao_helpers_data_GenerisAdapterRdf();
            $rdf = $adapter->export($class);

            if (!empty($rdf)) {
                $name = $formValues['filename'] . '_' . time() . '.rdf';
                $path = tao_helpers_File::concat([$destination, $name]);

                if (!tao_helpers_File::securityCheck($path, true)) {
                    throw new Exception('Unauthorized file name');
                }

                if (file_put_contents($path, $rdf)) {
                    $this->getEventManager()->trigger(new RdfExportEvent($class));

                    return $path;
                }
            }
        }

        return '';
    }