An enclosure element is an optional subelement of item. It describes a media object attached to that item, such as a mp3 file.
It has three required attributes:
url - indicates where the enclosure is located. This value is retrieved with the getUrl method.
$url = $element->getUrl();
length - indicates how big the enclosure is in bytes. This value is retrieved with the getLength method.
$length= $element->getLength();
type - indicates the MIME type of the enclosure. This value is retrieved with the getType method.
$type = $element->getType();
|