Handles everything related to enclosures (including Media RSS and iTunes RSS)
More...
|
| __construct ($link=null, $type=null, $length=null, $javascript=null, $bitrate=null, $captions=null, $categories=null, $channels=null, $copyright=null, $credits=null, $description=null, $duration=null, $expression=null, $framerate=null, $hashes=null, $height=null, $keywords=null, $lang=null, $medium=null, $player=null, $ratings=null, $restrictions=null, $samplingrate=null, $thumbnails=null, $title=null, $width=null) |
| Constructor, used to input the data.
|
|
| __toString () |
| String-ified version.
|
|
| embed ($options='', $native=false) |
| Embed the enclosure using Javascript.
|
|
| get_bitrate () |
| Get the bitrate.
|
|
| get_caption ($key=0) |
| Get a single caption.
|
|
| get_captions () |
| Get all captions.
|
|
| get_categories () |
| Get all categories.
|
|
| get_category ($key=0) |
| Get a single category.
|
|
| get_channels () |
| Get the number of audio channels.
|
|
| get_copyright () |
| Get the copyright information.
|
|
| get_credit ($key=0) |
| Get a single credit.
|
|
| get_credits () |
| Get all credits.
|
|
| get_description () |
| Get the description of the enclosure.
|
|
| get_duration ($convert=false) |
| Get the duration of the enclosure.
|
|
| get_expression () |
| Get the expression.
|
|
| get_extension () |
| Get the file extension.
|
|
| get_framerate () |
| Get the framerate (in frames-per-second)
|
|
| get_handler () |
| Get the preferred handler.
|
|
| get_hash ($key=0) |
| Get a single hash.
|
|
| get_hashes () |
| Get all credits.
|
|
| get_height () |
| Get the height.
|
|
| get_keyword ($key=0) |
| Get a single keyword.
|
|
| get_keywords () |
| Get all keywords.
|
|
| get_language () |
| Get the language.
|
|
| get_length () |
| Get length.
|
|
| get_link () |
| Get the URL.
|
|
| get_medium () |
| Get the medium.
|
|
| get_player () |
| Get the player URL.
|
|
| get_rating ($key=0) |
| Get a single rating.
|
|
| get_ratings () |
| Get all ratings.
|
|
| get_restriction ($key=0) |
| Get a single restriction.
|
|
| get_restrictions () |
| Get all restrictions.
|
|
| get_sampling_rate () |
| Get the sampling rate (in kHz)
|
|
| get_size () |
| Get the file size (in MiB)
|
|
| get_thumbnail ($key=0) |
| Get a single thumbnail.
|
|
| get_thumbnails () |
| Get all thumbnails.
|
|
| get_title () |
| Get the title.
|
|
| get_type () |
| Get mimetype of the enclosure.
|
|
| get_width () |
| Get the width.
|
|
| native_embed ($options='') |
| Embed the enclosure using <embed>
|
|
Handles everything related to enclosures (including Media RSS and iTunes RSS)
Used by {
- See also
- SimplePie\Item\get_enclosure()} and {
-
SimplePie\Itemget_enclosures()}
This class can be overloaded with {
- See also
- SimplePie\SimplePie\set_enclosure_class()}
@subpackage API
◆ __construct()
Enclosure::__construct |
( |
| $link = null, |
|
|
| $type = null, |
|
|
| $length = null, |
|
|
| $javascript = null, |
|
|
| $bitrate = null, |
|
|
| $captions = null, |
|
|
| $categories = null, |
|
|
| $channels = null, |
|
|
| $copyright = null, |
|
|
| $credits = null, |
|
|
| $description = null, |
|
|
| $duration = null, |
|
|
| $expression = null, |
|
|
| $framerate = null, |
|
|
| $hashes = null, |
|
|
| $height = null, |
|
|
| $keywords = null, |
|
|
| $lang = null, |
|
|
| $medium = null, |
|
|
| $player = null, |
|
|
| $ratings = null, |
|
|
| $restrictions = null, |
|
|
| $samplingrate = null, |
|
|
| $thumbnails = null, |
|
|
| $title = null, |
|
|
| $width = null ) |
Constructor, used to input the data.
For documentation on all the parameters, see the corresponding properties and their accessors
@uses idna_convert If available, this will convert an IDN
◆ __toString()
Enclosure::__toString |
( |
| ) |
|
String-ified version.
- Return values
-
◆ embed()
Enclosure::embed |
( |
| $options = '', |
|
|
| $native = false ) |
Embed the enclosure using Javascript.
$options
is an array or comma-separated key:value string, with the following properties:
alt
(string): Alternate content for when an end-user does not have the appropriate handler installed or when a file type is unsupported. Can be any text or HTML. Defaults to blank.
altclass
(string): If a file type is unsupported, the end-user will see the alt text (above) linked directly to the content. That link will have this value as its class name. Defaults to blank.
audio
(string): This is an image that should be used as a placeholder for audio files before they're loaded (QuickTime-only). Can be any relative or absolute URL. Defaults to blank.
bgcolor
(string): The background color for the media, if not already transparent. Defaults to #ffffff
.
height
(integer): The height of the embedded media. Accepts any numeric pixel value (such as 360
) or auto
. Defaults to auto
, and it is recommended that you use this default.
loop
(boolean): Do you want the media to loop when it's done? Defaults to false
.
mediaplayer
(string): The location of the included mediaplayer.swf
file. This allows for the playback of Flash Video (.flv
) files, and is the default handler for non-Odeo MP3's. Defaults to blank.
video
(string): This is an image that should be used as a placeholder for video files before they're loaded (QuickTime-only). Can be any relative or absolute URL. Defaults to blank.
width
(integer): The width of the embedded media. Accepts any numeric pixel value (such as 480
) or auto
. Defaults to auto
, and it is recommended that you use this default.
widescreen
(boolean): Is the enclosure widescreen or standard? This applies only to video enclosures, and will automatically resize the content appropriately. Defaults to false
, implying 4:3 mode.
Note: Non-widescreen (4:3) mode with width
and height
set to auto
will default to 480x360 video resolution. Widescreen (16:9) mode with width
and height
set to auto
will default to 480x270 video resolution.
- Todo
- If the dimensions for media:content are defined, use them when width/height are set to 'auto'.
- Parameters
-
array | string | $options | Comma-separated key:value list, or array |
bool | $native | Use <embed> |
- Return values
-
string | HTML string to output |
◆ get_bitrate()
Enclosure::get_bitrate |
( |
| ) |
|
Get the bitrate.
- Return values
-
◆ get_caption()
Enclosure::get_caption |
( |
| $key = 0 | ) |
|
Get a single caption.
- Parameters
-
- Return values
-
◆ get_captions()
Enclosure::get_captions |
( |
| ) |
|
Get all captions.
- Return values
-
- See also
- SimplePie\Caption} objects
◆ get_categories()
Enclosure::get_categories |
( |
| ) |
|
Get all categories.
- Return values
-
- See also
- SimplePie\Category} objects
◆ get_category()
Enclosure::get_category |
( |
| $key = 0 | ) |
|
Get a single category.
- Parameters
-
- Return values
-
◆ get_channels()
Enclosure::get_channels |
( |
| ) |
|
Get the number of audio channels.
- Return values
-
◆ get_copyright()
Enclosure::get_copyright |
( |
| ) |
|
Get the copyright information.
- Return values
-
◆ get_credit()
Enclosure::get_credit |
( |
| $key = 0 | ) |
|
Get a single credit.
- Parameters
-
- Return values
-
◆ get_credits()
Enclosure::get_credits |
( |
| ) |
|
Get all credits.
- Return values
-
- See also
- SimplePie\Credit} objects
◆ get_description()
Enclosure::get_description |
( |
| ) |
|
Get the description of the enclosure.
- Return values
-
◆ get_duration()
Enclosure::get_duration |
( |
| $convert = false | ) |
|
Get the duration of the enclosure.
- Parameters
-
bool | $convert | Convert seconds into hh:mm:ss |
- Return values
-
string|int|null | 'hh:mm:ss' string if $convert was specified, otherwise integer (or null if none found) |
◆ get_expression()
Enclosure::get_expression |
( |
| ) |
|
Get the expression.
- Return values
-
string | Probably one of 'sample', 'full', 'nonstop', 'clip'. Defaults to 'full' |
◆ get_extension()
Enclosure::get_extension |
( |
| ) |
|
Get the file extension.
- Return values
-
◆ get_framerate()
Enclosure::get_framerate |
( |
| ) |
|
Get the framerate (in frames-per-second)
- Return values
-
◆ get_handler()
Enclosure::get_handler |
( |
| ) |
|
Get the preferred handler.
- Return values
-
string|null | One of 'flash', 'fmedia', 'quicktime', 'wmedia', 'mp3' |
◆ get_hash()
Enclosure::get_hash |
( |
| $key = 0 | ) |
|
◆ get_hashes()
Enclosure::get_hashes |
( |
| ) |
|
Get all credits.
- Return values
-
array|null | Array of strings, see { |
- See also
- get_hash()}
◆ get_height()
Enclosure::get_height |
( |
| ) |
|
Get the height.
- Return values
-
◆ get_keyword()
Enclosure::get_keyword |
( |
| $key = 0 | ) |
|
Get a single keyword.
- Parameters
-
- Return values
-
◆ get_keywords()
Enclosure::get_keywords |
( |
| ) |
|
Get all keywords.
- Return values
-
array|null | Array of strings |
◆ get_language()
Enclosure::get_language |
( |
| ) |
|
◆ get_length()
Enclosure::get_length |
( |
| ) |
|
Get length.
- Return values
-
◆ get_link()
Get the URL.
- Return values
-
◆ get_medium()
Enclosure::get_medium |
( |
| ) |
|
◆ get_player()
Enclosure::get_player |
( |
| ) |
|
Get the player URL.
Typically the same as {
- See also
- get_permalink()}
- Return values
-
◆ get_rating()
Enclosure::get_rating |
( |
| $key = 0 | ) |
|
Get a single rating.
- Parameters
-
- Return values
-
◆ get_ratings()
Enclosure::get_ratings |
( |
| ) |
|
Get all ratings.
- Return values
-
- See also
- SimplePie\Rating} objects
◆ get_restriction()
Enclosure::get_restriction |
( |
| $key = 0 | ) |
|
Get a single restriction.
- Parameters
-
- Return values
-
SimplePie\Restriction|null | |
◆ get_restrictions()
Enclosure::get_restrictions |
( |
| ) |
|
Get all restrictions.
- Return values
-
- See also
- SimplePie\Restriction} objects
◆ get_sampling_rate()
Enclosure::get_sampling_rate |
( |
| ) |
|
Get the sampling rate (in kHz)
- Return values
-
◆ get_size()
Get the file size (in MiB)
- Return values
-
float|null | File size in mebibytes (1048 bytes) |
◆ get_thumbnail()
Enclosure::get_thumbnail |
( |
| $key = 0 | ) |
|
Get a single thumbnail.
- Parameters
-
- Return values
-
◆ get_thumbnails()
Enclosure::get_thumbnails |
( |
| ) |
|
Get all thumbnails.
- Return values
-
array|null | Array of thumbnail URLs |
◆ get_title()
Get the title.
- Return values
-
◆ get_type()
Get mimetype of the enclosure.
- See also
- get_real_type()
- Return values
-
◆ get_width()
Get the width.
- Return values
-
◆ native_embed()
Enclosure::native_embed |
( |
| $options = '' | ) |
|
Embed the enclosure using <embed>
- Deprecated
- Use the second parameter to {
- See also
- embed} instead
- Parameters
-
array | string | $options | See first parameter to { |
- See also
- embed}
- Return values
-
string | HTML string to output |
◆ $bitrate
string Enclosure::$bitrate |
◆ $captions
array Enclosure::$captions |
◆ $categories
array Enclosure::$categories |
◆ $channels
◆ $copyright
◆ $credits
array Enclosure::$credits |
◆ $description
string Enclosure::$description |
◆ $duration
◆ $expression
string Enclosure::$expression |
◆ $framerate
string Enclosure::$framerate |
◆ $handler
string Enclosure::$handler |
◆ $hashes
◆ $height
string Enclosure::$height |
◆ $javascript
null Enclosure::$javascript |
◆ $keywords
array Enclosure::$keywords |
◆ $lang
◆ $length
string Enclosure::$length |
◆ $link
◆ $medium
string Enclosure::$medium |
◆ $player
string Enclosure::$player |
◆ $ratings
array Enclosure::$ratings |
◆ $restrictions
array Enclosure::$restrictions |
◆ $samplingrate
string Enclosure::$samplingrate |
◆ $thumbnails
array Enclosure::$thumbnails |
◆ $title
◆ $type
◆ $width
The documentation for this class was generated from the following file:
- lib/simplepie/src/Enclosure.php