Construct a new Zend_Feed_Abstract object from a custom array

@param  array  $data
@param  string $format (rss|atom) the requested output format
@return Zend_Feed_Abstract
971349
public static function importArray(array $data, $format = 'atom')
    {
        $obj = 'Zend_Feed_' . ucfirst(strtolower($format));
        /**
         * @see Zend_Loader
         */
        require_once 'Zend/Loader.php';
        Zend_Loader::loadClass($obj);
        /**
         * @see Zend_Feed_Builder
         */
        require_once 'Zend/Feed/Builder.php';
        return new $obj(null, null, new Zend_Feed_Builder($data));
    }
1198378
public function setFormat(string $format = \null)
    {
        $validValues = ['png', 'jpg', 'webp'];

        if (\null !== $format && !\in_array($format, $validValues, \true)) {
            throw new \InvalidArgumentException(\sprintf(
                'Unknown format "%s" given. Expected "%s" or null.',
                $format,
                \implode(', ', $validValues)
            ));
        }

        $this->format = $format;

        return $this;
    }
1087373
public static function fromArray(array $data)
    {
        return new static(
            $data['uri'],
            $data['title'],
            $data['date'],
            $data['type'],
            $data['content'],
            isset($data['template']) ? $data['template'] : null,
            isset($data['description']) ? $data['description'] : null,
            isset($data['seoTitle']) ? $data['seoTitle'] : null,
            isset($data['excerpt']) ? $data['excerpt'] : null,
            isset($data['isIndex']) ? $data['isIndex'] : false
        );
    }
444279
public function createFromData(array $data): AbstractEntity
    {
        /** @var AbstractEntity $result */
        $result = $this->factory->create();
        $result->mapFromArray($data);
        return $result;
    }
492711
public static function fromArray(array $data)
    {
        $models = collect($data)->map(function ($value) {
            if ($value instanceof Model) {
                return [$value];
            } elseif ($value instanceof EloquentCollection) {
                return $value->flatten();
            }
        })->collapse()->filter();

        return $models->map(function ($model) {
            return FormatModel::given($model);
        })->all();
    }
121651
public function defaultFormat($format)
    {
        $this->default = $format;

        if (isset($this->formats[$format])) {
            $item = $this->formats[$format];
            $this->formats = [$format => $item] + $this->formats;
        }

        return $this;
    }
459612
public function loadString($data, $format='Json', array $options=[])
  {
    $handler = Format::getInstance($format);
    
    $obj = $handler->stringToObject($data, $options);
    $this->loadObject($obj);

    return true;
  }
466065
public static function create(string $format = SerializerBuilder::DEFAULT_FORMAT) : SerializerInterface
    {
        return SerializerBuilder::instance()->setFormat($format)->build();
    }
960770
public function setData($data, $format = 'dmY')
    {
        $this->data = trim($data, '0 ') ? Carbon::createFromFormat($format, $data) : null;

        return $this;
    }
917440
public function toString($format = Format::JSON, $options = [])
    {
        return StructureHelper::toString($this->data, $format, $options);
    }
81152
public function sayAs(string $interpretAs, string $content, string $format = null): ContainerElement
    {
        /** @var ContainerElement $this */
        return $this->addElement(SayAs::factory($interpretAs, $content, $format));
    }
272156
public function addFormat($format, array $mimeTypes, array $extensions = null)
    {
        $this->formats[$format] = [is_null($extensions) ? [$format] : $extensions, $mimeTypes];

        return $this;
    }
254183
protected static function createDate(string $date, string $format = 'Y-m-d'): \DateTime
    {
        return \DateTime::createFromFormat($format, $date);
    }
419889
public static function xmlToArray($xml, $format = self::XML_GROUP) {
		if (is_string($xml)) {
			$xml = @simplexml_load_string($xml);
		}

		if (count($xml->children()) <= 0) {
			return (string)$xml;
		}

		$array = array();

		foreach ($xml->children() as $element => $node) {
			$data = array();

			if (!isset($array[$element])) {
				$array[$element] = "";
			}

			if (!$node->attributes() || $format === self::XML_NONE) {
				$data = self::xmlToArray($node, $format);

			} else {
				switch ($format) {
					case self::XML_GROUP:
						$data = array(
							'attributes' => array(),
							'value' => (string)$node
						);

						if (count($node->children()) > 0) {
							$data['value'] = self::xmlToArray($node, $format);
						}

						foreach ($node->attributes() as $attr => $value) {
							$data['attributes'][$attr] = (string)$value;
						}
					break;

					case self::XML_MERGE:
					case self::XML_OVERWRITE:
						if ($format === self::XML_MERGE) {
							if (count($node->children()) > 0) {
								$data = $data + self::xmlToArray($node, $format);
							} else {
								$data['value'] = (string)$node;
							}
						}

						foreach ($node->attributes() as $attr => $value) {
							$data[$attr] = (string)$value;
						}
					break;
				}
			}

			if (count($xml->{$element}) > 1) {
				$array[$element][] = $data;
			} else {
				$array[$element] = $data;
			}
		}

		return $array;
	}
1270510
public function encode($data, $format, array $context = [])
    {
        $jsonEncodeOptions = $context[self::OPTIONS] ?? $this->defaultContext[self::OPTIONS];
        $encodedJson = json_encode($data, $jsonEncodeOptions);

        if (JSON_ERROR_NONE !== json_last_error() && (false === $encodedJson || !($jsonEncodeOptions & JSON_PARTIAL_OUTPUT_ON_ERROR))) {
            throw new NotEncodableValueException(json_last_error_msg());
        }

        return $encodedJson;
    }
422387
public function getCreateDate($format = null)
    {
        $node = $this->getFirst('//epp:epp/epp:response/epp:resData/contact:creData/contact:crDate');
        if ($format === null) {
            return $node->nodeValue;
        }

        return date_create_from_format($format, $node->nodeValue);
    }
195095
public function getDataRemessa($format){
        if(is_null($this->dataRemessa)){
            return Carbon::now()->format($format);
        }
        return $this->dataRemessa->format($format);
    }