You are here

public function FeedsEnclosure::__construct in Feeds 8.2

Constructor, requires MIME type.

Parameters

$value: A path to a local file or a URL to a remote document.

$mimetype: The mime type of the resource.

Overrides FeedsElement::__construct

1 method overrides FeedsEnclosure::__construct()
FeedsSimplePieEnclosure::__construct in lib/Drupal/feeds/FeedsSimplePieEnclosure.php
Constructor requires SimplePie enclosure object.

File

lib/Drupal/feeds/FeedsEnclosure.php, line 19

Class

FeedsEnclosure
Enclosure element, can be part of the result array.

Namespace

Drupal\feeds

Code

public function __construct($value, $mime_type) {
  parent::__construct($value);
  $this->mime_type = $mime_type;
}