public function addEnclosure($strFile, $strUrl = null)
{
if ($strFile == '' || !file_exists(TL_ROOT . '/' . $strFile)) {
return;
}
if ($strUrl === null) {
$strUrl = \Environment::get('base');
}
$objFile = new \File($strFile);
$this->arrData['enclosure'][] = array('url' => $strUrl . \System::urlEncode($strFile), 'length' => $objFile->size, 'type' => $objFile->mime);
}