class FeedsSimplePieEnclosure in Feeds 6
Same name and namespace in other branches
- 7.2 plugins/FeedsSimplePieParser.inc \FeedsSimplePieEnclosure
- 7 plugins/FeedsSimplePieParser.inc \FeedsSimplePieEnclosure
Adapter to present SimplePie_Enclosure as FeedsEnclosure object.
Hierarchy
- class \FeedsElement
- class \FeedsEnclosure
- class \FeedsSimplePieEnclosure
- class \FeedsEnclosure
Expanded class hierarchy of FeedsSimplePieEnclosure
File
- plugins/
FeedsSimplePieParser.inc, line 6
View source
class FeedsSimplePieEnclosure extends FeedsEnclosure {
protected $simplepie_enclosure;
private $_serialized_simplepie_enclosure;
/**
* Constructor requires SimplePie enclosure object.
*/
function __construct(SimplePie_Enclosure $enclosure) {
$this->simplepie_enclosure = $enclosure;
}
/**
* Serialization helper.
*
* Handle the simplepie enclosure class seperately ourselves.
*/
public function __sleep() {
$this->_serialized_simplepie_enclosure = serialize($this->simplepie_enclosure);
return array(
'_serialized_simplepie_enclosure',
);
}
/**
* Unserialization helper.
*
* Ensure that the simplepie class definitions are loaded for the enclosure when unserializing.
*/
public function __wakeup() {
feeds_include_library('simplepie.inc', 'simplepie');
$this->simplepie_enclosure = unserialize($this->_serialized_simplepie_enclosure);
}
/**
* Override parent::getValue().
*/
public function getValue() {
return $this->simplepie_enclosure
->get_link();
}
/**
* Override parent::getMIMEType().
*/
public function getMIMEType() {
return $this->simplepie_enclosure
->get_real_type();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FeedsElement:: |
protected | property | ||
FeedsElement:: |
public | function | 1 | |
FeedsEnclosure:: |
protected | property | Delete flag, denoting whether a file should be deleted when this object is destroyed. | |
FeedsEnclosure:: |
protected | property | ||
FeedsEnclosure:: |
protected | property | ||
FeedsEnclosure:: |
public | function | ||
FeedsEnclosure:: |
public | function | @todo Get file extension from mime_type. @todo This is not concurrency safe. | |
FeedsEnclosure:: |
public | function | Destructor, clean up any temporary files. | |
FeedsSimplePieEnclosure:: |
protected | property | ||
FeedsSimplePieEnclosure:: |
private | property | ||
FeedsSimplePieEnclosure:: |
public | function |
Override parent::getMIMEType(). Overrides FeedsEnclosure:: |
|
FeedsSimplePieEnclosure:: |
public | function |
Override parent::getValue(). Overrides FeedsElement:: |
|
FeedsSimplePieEnclosure:: |
function |
Constructor requires SimplePie enclosure object. Overrides FeedsEnclosure:: |
||
FeedsSimplePieEnclosure:: |
public | function | Serialization helper. | |
FeedsSimplePieEnclosure:: |
public | function | Unserialization helper. |