{@inheritDoc}
@link https://github.com/briannesbitt/Carbon/blob/master/src/Carbon/Carbon.php
18963
public static function create($year=null, $month=null, $day=null, $hour=null, $minute=null, $second=null, $tz=null) {
		$year = ($year === null) ? date('Y') : $year;
		$month = ($month === null) ? date('n') : $month;
		$day = ($day === null) ? date('j') : $day;

		if ($hour === null) {
			$hour = date('G');
			$minute = ($minute === null) ? date('i') : $minute;
			$second = ($second === null) ? date('s') : $second;
		}
		else {
			$minute = ($minute === null) ? 0 : $minute;
			$second = ($second === null) ? 0 : $second;
		}

        return static::createFromFormat('Y-n-j G:i:s', sprintf('%s-%s-%s %s:%02s:%02s', $year, $month, $day, $hour, $minute, $second), $tz);
	}
1241207
public function duplicate()
    {
        $db = Loader::db();
        $em = \ORM::entityManager();

        $versions = $this->versions;
        $thumbs = Type::getVersionList();
        
        // duplicate the core file object
        $nf = clone $this;
        $dh = Loader::helper('date');
        $date = $dh->getOverridableNow();
        $nf->fDateAdded = new Carbon($date);

        $em->persist($nf);
        $em->flush();

        $folder = $this->getFileFolderObject();
        $folderNode = \Concrete\Core\Tree\Node\Type\File::add($nf, $folder);
        $nf->folderTreeNodeID = $folder->getTreeNodeID();

        $em->persist($nf);
        $em->flush();

        // clear out the versions
        $nf->versions = new ArrayCollection();

        $fi = Core::make('helper/file');
        $cf = Core::make('helper/concrete/file');
        $importer = new Importer();
        $filesystem = $this->getFileStorageLocationObject()->getFileSystemObject();
        foreach ($versions as $version) {
            if ($version->isApproved()) {
                $cloneVersion = clone $version;
                $cloneVersion->setFileVersionID(1);
                $cloneVersion->setFile($nf);

                $em->persist($cloneVersion);
                $em->flush();

                $cloneVersion->duplicateUnderlyingFile();

                foreach ($version->getAttributes() as $value) {
                    $value = clone $value;
                    $value->setVersion($cloneVersion);
                    $em->persist($value);
                }

                $em->flush();

                $nf->versions->add($cloneVersion);
                foreach ($thumbs as $type) {
                    $cloneVersion->duplicateUnderlyingThumbnailFiles($type, $version);
                }
            }
        }

        $em->persist($nf);
        $em->flush();

        $v = [$this->fID];
        $q = 'select fID, paID, pkID from FilePermissionAssignments where fID = ?';
        $r = $db->query($q, $v);
        while ($row = $r->fetchRow()) {
            $v = [$nf->getFileID(), $row['paID'], $row['pkID']];
            $q = 'insert into FilePermissionAssignments (fID, paID, pkID) values (?, ?, ?)';
            $db->query($q, $v);
        }

        $fe = new \Concrete\Core\File\Event\DuplicateFile($this);
        $fe->setNewFileObject($nf);
        Events::dispatch('on_file_duplicate', $fe);

        return $nf;
    }
672645
public function autodiscover(): void
    {
        $entityMappings = [];
        foreach ($this->fileSystem->getEntityDirectories() as $entityDirectory) {
            $namespace = $this->namespaceDetector->detectFromDirectory($entityDirectory);
            if (! $namespace) {
                continue;
            }

            $entityMappings[] = [
                'name' => $namespace, // required name
                'prefix' => $namespace,
                'type' => 'annotation',
                'dir' => $entityDirectory->getRealPath(),
                'is_bundle' => false, // performance
            ];
        }

        $xmlNamespaces = [];

        $directoryByNamespace = $this->resolveDirectoryByNamespace($this->fileSystem->getEntityXmlFiles());
        foreach ($directoryByNamespace as $namespace => $directory) {
            if (in_array($namespace, $xmlNamespaces, true)) {
                continue;
            }

            $xmlNamespaces[] = $namespace;

            $entityMappings[] = [
                'name' => $namespace, // required name
                'prefix' => $namespace,
                'type' => 'xml',
                'dir' => $directory,
                'is_bundle' => false,
            ];
        }

        if (! count($entityMappings)) {
            return;
        }

        // @see https://symfony.com/doc/current/reference/configuration/doctrine.html#mapping-entities-outside-of-a-bundle
        $this->containerBuilder->prependExtensionConfig('doctrine', [
            'orm' => ['mappings' => $entityMappings],
        ]);
    }
382498
public function jsonSerialize()
    {
        if (static::$serializer) {
            return call_user_func(static::$serializer, $this);
        }

        $carbon = $this;

        return call_user_func(function () use ($carbon) {
            return get_object_vars($carbon);
        });
    }
218585
public function compile()
	{
	
		if ($this->multiSource)
		{
			$multiSRC = \StringUtil::deserialize($this->data->multiSRC);
			
			// Return if there are no files
			if (!is_array($multiSRC) || empty($multiSRC))
			{
				return '';
			}
			
			$objFiles = \FilesModel::findMultipleByUuids($multiSRC);			
		}
		else
		{
			// Return if there is no file
			if ($this->data->singleSRC == '')
			{
				return '';
			}
		
			$objFiles = \FilesModel::findMultipleByUuids(array($this->data->singleSRC));
		}

		if ($objFiles === null)
		{
			if (!\Validator::isUuid($multiSRC[0]))
			{
				return '<p class="error">'.$GLOBALS['TL_LANG']['ERR']['version2format'].'</p>';
			}
			return '';
		}
		
		$file = \Input::get('file', true);
		
		// Send the file to the browser and do not send a 404 header (see #4632)
		if ($file != '' && !preg_match('/^meta(_[a-z]{2})?\.txt$/', basename($file)))
		{
			while ($objFiles->next())
			{
				if ($file == $objFiles->path || dirname($file) == $objFiles->path)
				{
					\Controller::sendFileToBrowser($file);
				}
			}
			$objFiles->reset();
		}
		
		global $objPage;
		
		$allowedDownload = \StringUtil::trimsplit(',', strtolower(\Config::get('allowedDownload')));
		$allowedVideo = \StringUtil::trimsplit(',', strtolower(\Config::get('validVideoTypes')));
		$allowedAudio = \StringUtil::trimsplit(',', strtolower(\Config::get('validAudioTypes')));
		
		$files = array();
		$auxDate = array();

		// Get all files
		while ($objFiles->next())
		{
			// Continue if the files has been processed or does not exist
			if (isset($files[$objFiles->path]) || !file_exists(TL_ROOT . '/' . $objFiles->path))
			{
				continue;
			}
			
			// Single files
			if ($objFiles->type == 'file')
			{
				$objFile = new \File($objFiles->path, true);
				
				switch ($this->source)
				{
					case 'image':
						if (!$objFile->isImage)
						{
							continue 2;
						}
						break;
						
					case 'video':
						if (!in_array($objFile->extension, $allowedVideo))
						{
							continue 2;
						}
						break;
					
					case 'audio':
						if (!in_array($objFile->extension, $allowedAudio))
						{
							continue 2;
						}
						break;
					
					default:
						if ((!in_array($objFile->extension, $allowedDownload) || preg_match('/^meta(_[a-z]{2})?\.txt$/', $objFile->basename)))
						{
							continue 2;
						}
					break;
				}

				
				$arrMeta = \Frontend::getMetaData($objFiles->meta, $objPage->language);
				
				if (empty($arrMeta))
				{
					if ($this->metaIgnore)
					{
						continue;
					}
					elseif ($objPage->rootFallbackLanguage !== null)
					{
						$arrMeta = \Frontend::getMetaData($objFiles->meta, $objPage->rootFallbackLanguage);
					}
				}
				
				// Use the file name as title if none is given
				if ($arrMeta['title'] == '')
				{
					$arrMeta['title'] = \StringUtil::specialchars($objFile->basename);
				}

				$strHref = \Environment::get('request');
				
				// Remove an existing file parameter (see #5683)
				if (preg_match('/(&(amp;)?|\?)file=/', $strHref))
				{
					$strHref = preg_replace('/(&(amp;)?|\?)file=[^&]+/', '', $strHref);
				}
				
				$strHref .= ((\Config::get('disableAlias') || strpos($strHref, '?') !== false) ? '&amp;' : '?') . 'file=' . \System::urlEncode($objFiles->path);
				
				
				// Add the file
				$files[$objFiles->path] = array
				(
					'id'        => $objFiles->id,
					'uuid'      => $objFiles->uuid,
					'name'      => $objFile->basename,
					'path' 		=> $objFiles->path,
					'size'		=> ($this->canChangeSize) ? $this->data->size : $this->size,
					'alt'       => $arrMeta['title'],
					'title'     => $arrMeta['title'],
					'imageUrl'  => $arrMeta['link'],
					'caption'   => $arrMeta['caption'],
					'href'      => $strHref,
					'filesize'  => $this->getReadableSize($objFile->filesize, 1),
					'icon'      => TL_ASSETS_URL . 'assets/contao/images/' . $objFile->icon,
					'mime'      => $objFile->mime,
					'extension' => $objFile->extension
				);
				
				$auxDate[] = $objFile->mtime;
			}
			
			// Folders
			else
			{
				$objSubfiles = \FilesModel::findByPid($objFiles->uuid);
				
				if ($objSubfiles === null)
				{
					continue;
				}
				
				while ($objSubfiles->next())
				{
					// Skip subfolders
					if ($objSubfiles->type == 'folder')
					{
						continue;
					}
				
					$objFile = new \File($objSubfiles->path, true);
					
					switch ($this->source)
					{
						case 'image':
							if (!$objFile->isImage)
							{
								continue 2;
							}
							break;
						
						case 'video':
							if (!in_array($objFile->extension, $allowedVideo))
							{
								continue 2;
							}
							break;
						
						case 'audio':
							if (!in_array($objFile->extension, $allowedAudio))
							{
								continue 2;
							}
							break;
					
						default:
							if ((!in_array($objFile->extension, $allowedDownload) || preg_match('/^meta(_[a-z]{2})?\.txt$/', $objFile->basename)))
							{
								continue 2;
							}
						break;
					}
					
					$arrMeta = \Frontend::getMetaData($objSubfiles->meta, $objPage->language);
					
					if (empty($arrMeta))
					{
						if ($this->metaIgnore)
						{
							continue;
						}
						elseif ($objPage->rootFallbackLanguage !== null)
						{
							$arrMeta = \Frontend::getMetaData($objSubfiles->meta, $objPage->rootFallbackLanguage);
						}
					}
					
					// Use the file name as title if none is given
					if ($arrMeta['title'] == '')
					{
						$arrMeta['title'] = \StringUtil::specialchars($objFile->basename);
					}

					$strHref = \Environment::get('request');
					
					// Remove an existing file parameter (see #5683)
					if (preg_match('/(&(amp;)?|\?)file=/', $strHref))
					{
						$strHref = preg_replace('/(&(amp;)?|\?)file=[^&]+/', '', $strHref);
					}
					
					$strHref .= ((\Config::get('disableAlias') || strpos($strHref, '?') !== false) ? '&amp;' : '?') . 'file=' . \System::urlEncode($objSubfiles->path);

					
					// Add the file
					$files[$objSubfiles->path] = array
					(
						'id'        => $objSubfiles->id,
						'uuid'      => $objSubfiles->uuid,
						'name'      => $objSubfiles->basename,
						'path' 		=> $objSubfiles->path,
						'size'		=> ($this->canChangeSize) ? $this->data->size : $this->size,
						'alt'       => $arrMeta['title'],
						'title'     => $arrMeta['title'],
						'imageUrl'  => $arrMeta['link'],
						'caption'   => $arrMeta['caption'],
						'href'      => $strHref,
						'filesize'  => $this->getReadableSize($objSubfiles->filesize, 1),
						'icon'      => TL_ASSETS_URL . 'assets/contao/images/' . $objSubfiles->icon,
						'mime'      => $objSubfiles->mime,
						'extension' => $objSubfiles->extension
					);
					
					$auxDate[] = $objSubfiles->mtime;
				}
			}
		}
		
		// Sort array
		switch (($this->canChangeSortBy) ? $this->data->sortBy : $this->sortBy)
		{
			default:
			case 'name_asc':
				uksort($files, 'basename_natcasecmp');
				break;
			
			case 'name_desc':
				uksort($files, 'basename_natcasercmp');
				break;
			
			case 'date_asc':
				array_multisort($files, SORT_NUMERIC, $auxDate, SORT_ASC);
				break;
			
			case 'date_desc':
				array_multisort($files, SORT_NUMERIC, $auxDate, SORT_DESC);
				break;
			
			case 'custom':
				if ($this->data->orderSRC != '')
				{
					$tmp = \StringUtil::deserialize($this->data->orderSRC);
				
					if (!empty($tmp) && is_array($tmp))
					{
						// Remove all values
						$arrOrder = array_map(function(){}, array_flip($tmp));
						
						// Move the matching elements to their position in $arrOrder
						foreach ($files as $k=>$v)
						{
							if (array_key_exists($v['uuid'], $arrOrder))
							{
								$arrOrder[$v['uuid']] = $v;
								unset($files[$k]);
							}
						}
						
						// Append the left-over files at the end
						if (!empty($files))
						{
							$arrOrder = array_merge($arrOrder, array_values($files));
						}
							
						// Remove empty (unreplaced) entries
						$files = array_values(array_filter($arrOrder));
						
						unset($arrOrder);
					}
				}
				break;
			
			case 'random':
				shuffle($files);
				break;

			case 'html5media':
				// Pre-sorted array for recommended html4 video and audio order
				$arrOrder = array('mp4'=>null, 'm4v'=>null, 'mov'=>null, 'wmv'=>null, 'webm'=>null, 'ogv'=>null, 'm4a'=>null, 'mp3'=>null, 'wma'=>null, 'mpeg'=>null, 'wav'=>null, 'ogg'=>null);
				
				foreach ($files as $file)
				{
					if (!is_array($arrOrder[$file['extension']]))
					{
						$arrOrder[$file['extension']] = $file;
					}
					
				}

				// Remove empty (unreplaced) entries
				$files = array_values(array_filter($arrOrder));

				break;
		}

		$files = array_values($files);
		
		// Limit the total number of items
		if ($this->numberOfItems > 0)
		{
			$files = array_slice($files, 0, $this->numberOfItems);
		}
		
		// Prepare images
		if ($this->source == 'image')
		{
			$pictures = array();
			foreach ($files as $key=>$image)
			{
				$image['singleSRC'] = $image['path'];
				
				$this->addImageToTemplate($pictures[$key] = new \stdClass(), $image);	
				
				$pictures[$key] = $pictures[$key]->picture;
				$pictures[$key]['imageUrl'] = $image['imageUrl'];
				$pictures[$key]['caption'] = $image['caption'];
				$pictures[$key]['id'] = $image['id'];
				$pictures[$key]['uuid'] = $image['uuid'];
				$pictures[$key]['name'] = $image['name'];
				$pictures[$key]['path'] = $image['path'];
				$pictures[$key]['extension'] = $image['extension'];
			}
			
			$files = $pictures;
		}
		
		// no collection array for single source
		if (!$this->multiSource)
		{
			$files = $files[0];
		}

		$this->writeToTemplate($files);
	}
299581
public function getCreatedAt()
    {
        return ! empty($value = $this->getContentValue('created_at', null))
            ? $this->convertToCarbon($value)
            : null;
    }
653106
public static function parseCfgUri($uri, $source = null)
    {
        if (mb_orig_strpos($uri, '://') === false) {
            if (strncmp($uri, 'unix:', 5) === 0) {
                $e = explode(':', $uri);
                if (sizeof($e) === 4) {
                    $uri = 'unix://' . $e[1] . ':' . $e[2] . '@localhost' . $e[3];
                } elseif (sizeof($e) === 3) {
                    $uri = 'unix://' . $e[1] . '@localhost' . $e[2];
                } else {
                    $uri = 'unix://localhost' . $e[1];
                }
            } else {
                $uri = 'tcp://' . $uri;
            }
        }
        if (stripos($uri, 'unix:///') === 0) {
            $uri = 'unix://localhost/' . substr($uri, 8);
        }
        $zeroPortNum = false;
        $uri = preg_replace_callback('~:0(?:$|/)~', function () use (&$zeroPortNum) {
            $zeroPortNum = true;
            return '';
        }, $uri);
        $u = parse_url($uri);
        $u['host'] = trim($u['host'], '][');
        $u['uri'] = $uri;
        if ($zeroPortNum) {
            $u['port'] = 0;
        }
        if (!isset($u['scheme'])) {
            $u['scheme'] = '';
        }
        $u['params'] = [];
        if (!isset($u['fragment'])) {
            return $u;
        }
        $hash = '#' . $u['fragment'];
        $error = false;
        preg_replace_callback('~(#+)(.+?)(?=#|$)|(.+)~', function ($m) use (&$u, &$error, $uri) {
            if ($error) {
                return;
            }
            list(, $type, $value) = $m;
            if ($type === '#') { // standard value
                $e = explode('=', $value, 2);
                if (sizeof($e) === 2) {
                    list($key, $value) = $e;
                } else {
                    $key = $value;
                    $value = true;
                }
                $u['params'][$key] = $value;
            } elseif ($type === '##') { // Context name
                $u['params']['ctxname'] = $value;
            } else {
                Daemon::log('Malformed URI: ' . var_export($uri, true) . ', unexpected token \'' . $type . '\'');
                $error = true;
            }
        }, $hash);
        return $error ? false : $u;
    }
464590
public function compile($stub, $modelName, $modelData, stdClass $scaffolderConfig, $hash, array $extensions, $extra = null)
    {
        if (File::exists(base_path('scaffolder-config/cache/api_controller_' . $hash . self::CACHE_EXT)))
        {
            return $this->store($modelName, $scaffolderConfig, '', new FileToCompile(true, $hash));
        }
        else
        {
            $this->stub = $stub;

            $this->replaceClassName($modelName)
                ->setValidations($modelData);

            return $this->store($modelName, $scaffolderConfig, $this->stub, new FileToCompile(false, $hash));
        }
    }
564859
function deep_copy() {
    $frame = new Frame($this->get_node()->cloneNode());
    $frame->set_style(clone $this->_frame->get_original_style());
    $deco = Frame_Factory::decorate_frame($frame, $this->_dompdf);
    $deco->set_root($this->_root);

    foreach ($this->get_children() as $child)
      $deco->append_child($child->deep_copy());

    return $deco;
  }
499774
public function _buildTree(&$rootDoc, &$class, $depth = NULL)
    {
        if ($depth === NULL) {
            $start = TRUE;
            $depth = 0;
        } else {
            $start = FALSE;
        }
        $output = '';
        $undefinedClass = FALSE;
        if ($class->superclass()) {
            $superclass =& $rootDoc->classNamed($class->superclass());
            if ($superclass) {
                $result = $this->_buildTree($rootDoc, $superclass, $depth);
                $output .= $result[0];
                $depth = ++$result[1];
            } else {
                $output .= $class->superclass().'<br>';
                $output .= str_repeat('   ', $depth).' └─';
                $depth++;
                $undefinedClass = TRUE;
            }
        }
        if ($depth > 0 && !$undefinedClass) {
            $output .= str_repeat('   ', $depth).' └─';
        }
        if ($start) {
            $output .= '<strong>'.$class->name().'</strong><br />';
        } else {
            $output .= '<a href="'.str_repeat('../', $this->_depth).$class->asPath().'">'.$class->name().'</a><br>';
        }

        return array($output, $depth);
    }
741328
public function find(): self
    {
        $preparedPaths = \array_unique(
            \array_merge(
                $this->getPreparedPaths((array) $this->paths['psr0']),
                $this->getPreparedPaths((array) $this->paths['psr4']),
                $this->getPreparedPaths((array) $this->paths['classmap'])
            ),
            \SORT_STRING
        );

        $finder = Finder::create()
            ->files()
            ->in($preparedPaths)
            ->exclude($this->excludes)
            ->name('*.php')
            ->sortByName();

        if ($this->filter !== null) {
            $finder->filter($this->filter);
        }

        /** @var \SplFileInfo $file */
        foreach ($finder as $file) {
            $realPath  = (string) $file->getRealPath();

            $namespace = null;
            $tokens    = \token_get_all((string) \file_get_contents($realPath));

            foreach ($tokens as $key => $token) {
                if (\is_array($token)) {
                    if ($token[0] === \T_NAMESPACE) {
                        $namespace = self::getNamespace($key + 2, $tokens);
                    } elseif ($token[0] === \T_INTERFACE) {
                        $name = self::getName($key + 2, $tokens);

                        if ($name === null) {
                            continue 2;
                        }

                        $this->interfaces[\ltrim($namespace . '\\' . $name, '\\')] = $realPath;
                    } elseif ($token[0] === \T_TRAIT) {
                        $name = self::getName($key + 2, $tokens);

                        if ($name === null) {
                            continue 2;
                        }

                        $this->traits[\ltrim($namespace . '\\' . $name, '\\')] = $realPath;
                    } elseif ($token[0] === \T_ABSTRACT) {
                        $name = self::getName($key + 4, $tokens);

                        if ($name === null) {
                            continue 2;
                        }

                        $this->abstractClasses[\ltrim($namespace . '\\' . $name, '\\')] = $realPath;

                        continue 2;
                    } elseif ($token[0] === \T_CLASS) {
                        $name = self::getName($key + 2, $tokens);

                        if ($name === null) {
                            continue 2;
                        }

                        $this->classes[\ltrim($namespace . '\\' . $name, '\\')] = $realPath;
                    }
                }
            }

            unset($tokens);
            // PHP 7 memory manager will not release after token_get_all(), see https://bugs.php.net/70098
            \gc_mem_caches();
        }

        return $this;
    }
1015072
public function getCreatedAt()
    {
        $metadata = $this->getMetadata();

        try {
            return isset($metadata['created']) ? Carbon::createFromTimestamp($metadata['created']) : null;
        } catch (Exception $e) {
            return;
        }
    }
670774
static function simpleXmlToStdClass(SimpleXMLElement &$source)
  {
    $res = new StdClass;
    $children = false;
    foreach ($source as $key => $value) {
      if (isset($res->$key)) {
        if (!is_array($res->$key)) {
          $res->$key = array($res->$key);
        }
        $ref = &$res->$key;
        $ref[] = CPS_Response::simpleXmlToStdClass($value);
      } else {
        $res->$key = CPS_Response::simpleXmlToStdClass($value);
      }
      $children = true;
    }
    if (!$children)
      return (string)$source;
    return $res;
  }
974173
public function compile()
    {
        // Path prefix
        $prefix = $this->getNewPrefix();
        // List of images
        $data = $this->getList();

        // sizes
        $sizes = [];
        foreach ($this->providers as $provider) {
            if ($provider instanceof SizeProviderInterface) {
                $sizes = array_merge($sizes, $provider->getSizes());
            }
        }

        $num = 0;
        $scss = [];
        foreach ($data as $name => $list) {
            // Sprite size
            $size = !isset($sizes[$name]) ? null : $sizes[$name];
            $size = $this->getSize($name, $size);
            if (is_array($size)) {
                $border = $size[1];
                $sizeH = isset($size[2]) ? $size[2] : $size[0];
                $sizeW = $size[0];
            } else {
                $border = static::BORDER_WIDTH;
                $sizeH = $sizeW = $size;
            }
            $scss[] = $this->compileFile($prefix, $name, $list, [$sizeW, $sizeH], $border);
            $num += count($list);
        }

        // Populating template
        $template = file_get_contents($this->template);
        $scss = str_replace(
            static::TEMPLATE_NEEDLE, join("\n", $scss), $template
        );

        // Creating global classes
        if (static::CREATE_CLASSES) {
            foreach ($data as $name => $list) {
                $scss .= '.#{$' . static::NAMESPACE_NAME . '}';
                $scss .= ', .#{$' . static::NAMESPACE_NAME . '}-' . $name . ' {' . "\n";
                $scss .= '@include ' . static::PREFIX_SPRITE . $name . ';' . "\n";
                $scss .= '};' . "\n";
            }
        }

        // Writing the file
        file_put_contents($this->stylePath, $scss);

        return $num;
    }
574757
public function getLastLogin() : Carbon
    {
        if ($this->lastLoginParsed !== null) {
            return $this->lastLoginParsed;
        }

        $name = $this->getLastLoginKey();

        $lastLogin = $this->asDateTime($this->getAttributeFromArray($name) ?? Carbon::now());

        return $this->{$name} = $this->lastLoginParsed = Carbon::createFromFormat('Y-m-d H:i:s', $lastLogin);
    }
1069401
static function processNodeTransformation( $useComments, $php, $tpl, &$node, &$resourceData, &$newNode )
    {
        $newNode = eZTemplateCompiler::processNodeTransformationRoot( $useComments, $php, $tpl, $node, $resourceData );
    }
923307
private function build(): void
    {
        $prefix = "<?xml version='1.0' encoding='UTF-8'?>" . $this->glue() . "<feed xmlns='http://www.w3.org/2005/Atom' xmlns:apps='http://schemas.google.com/apps/2006'>";
        $suffix = '</feed>';

        $xml = collect($this->filters)->map(function ($items) {
            return $this->buildEntry($items);
        })->implode($this->glue());

        $this->xml = collect([$prefix, $xml, $suffix])->implode($this->glue());

        if ($this->writeFile) {
            $this->filesystem->dumpFile($this->outputFile, $this->xml);
        }
    }