class FeedsSimplePieEnclosure in Feeds 8.2
Hierarchy
- class \Drupal\feeds\FeedsElement
- class \Drupal\feeds\FeedsEnclosure
- class \Drupal\feeds\FeedsSimplePieEnclosure
- class \Drupal\feeds\FeedsEnclosure
Expanded class hierarchy of FeedsSimplePieEnclosure
1 file declares its use of FeedsSimplePieEnclosure
- FeedsSimplePieParser.php in lib/
Drupal/ feeds/ Plugin/ feeds/ parser/ FeedsSimplePieParser.php - Contains FeedsSimplePieParser and related classes.
File
- lib/
Drupal/ feeds/ FeedsSimplePieEnclosure.php, line 5
Namespace
Drupal\feedsView 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_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 | Magic method __toString() for printing and string conversion of this object. | |
FeedsEnclosure:: |
protected | property | ||
FeedsEnclosure:: |
public | function | ||
FeedsEnclosure:: |
public | function | Get a Drupal file object of the enclosed resource, download if necessary. | |
FeedsEnclosure:: |
public | function | Use this method instead of FeedsElement::getValue() to get the file name transformed for better local saving (underscores instead of spaces) | |
FeedsEnclosure:: |
public | function | Use this method instead of FeedsElement::getValue() when fetching the file from the URL. | |
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. |