core-bundle/src/Resources/contao/library/Contao/FeedItem.php
public function addEnclosure($strFile, $strUrl=null, $strMedia='enclosure')
	{
		if ($strFile == '' || !file_exists(System::getContainer()->getParameter('kernel.project_dir') . '/' . $strFile))
		{
			return;
		}

		if ($strUrl === null)
		{
			$strUrl = Environment::get('base');
		}

		$objFile = new File($strFile);

		$this->arrData['enclosure'][] = array
		(
			'media' => $strMedia,
			'url' => $strUrl . System::urlEncode($strFile),
			'length' => $objFile->size,
			'type' => $objFile->mime
		);
	}
public function addEnclosure($strFile, $strUrl=null, $strMedia='enclosure')
	{
		if ($strFile == '' || !file_exists(System::getContainer()->getParameter('kernel.project_dir') . '/' . $strFile))
		{
			return;
		}

		if ($strUrl === null)
		{
			$strUrl = Environment::get('base');
		}

		$objFile = new File($strFile);

		$this->arrData['enclosure'][] = array
		(
			'media' => $strMedia,
			'url' => $strUrl . System::urlEncode($strFile),
			'length' => $objFile->size,
			'type' => $objFile->mime
		);
	}
Add an enclosure

@param string $strFile  The file path
@param string $strUrl   The base URL
@param string $strMedia The media type