public
|
|
public
|
|
public
string
|
#
__toString( )
Get a string representation of the item
Get a string representation of the item
Returns
string
|
public
|
#
__destruct( )
Remove items that link back to this before destroying this object
Remove items that link back to this before destroying this object
|
public
array
|
#
get_item_tags( string $namespace, string $tag )
Get data for an item-level element
Get data for an item-level element
This method allows you to get access to ANY element/attribute that is a
sub-element of the item/entry tag.
See SimplePie::get_feed_tags() for a description of the return
value
Parameters
- $namespace
string - $namespace The URL of the XML namespace of the elements you're trying to access
- $tag
string - $tag Tag name
Returns
array
Since
1.0
See
|
public
string
|
#
get_base( array $element = array() )
Get the base URL value from the parent feed
Get the base URL value from the parent feed
Uses <xml:base>
Parameters
- $element
array - $element
Returns
string
|
public
string
|
#
sanitize( string $data, integer $type, string $base = '' )
Sanitize feed data
Parameters
- $data
string - $data Data to sanitize
- $type
integer - $type One of the SIMPLEPIE_CONSTRUCT_* constants
- $base
string - $base Base URL to resolve URLs against
Returns
string - Sanitized data
See
|
public
SimplePie
|
#
get_feed( )
Get the parent feed
Note: this may not work as you think for multifeeds!
Returns
Since
1.0
Link
|
public
string
|
#
get_id( boolean $hash = false )
Get the unique identifier for the item
Get the unique identifier for the item
This is usually used when writing code to check for new items in a feed.
Uses <atom:id> , <guid> ,
<dc:identifier> or the about attribute for RDF.
If none of these are supplied (or $hash is true), creates an MD5
hash based on the permalink and title. If either of those are not supplied,
creates a hash based on the full feed data.
Parameters
- $hash
boolean - $hash Should we force using a hash instead of the supplied ID?
Returns
string
Since
Beta 2
|
public
string|null
|
#
get_title( )
Get the title of the item
Get the title of the item
Uses <atom:title> , <title> or
<dc:title>
Returns
string|null
Since
Beta 2 (previously called get_item_title since 0.8)
|
public
string|null
|
#
get_description( boolean $description_only = false )
Get the content for the item
Get the content for the item
Prefers summaries over full content , but will return full content if a
summary does not exist.
To prefer full content instead, use SimplePie_Item::get_content()
Uses <atom:summary> , <description> ,
<dc:description> or <itunes:subtitle>
Parameters
- $description_only
boolean - $description_only Should we avoid falling back to the content?
Returns
string|null
Since
0.8
|
public
string|null
|
#
get_content( boolean $content_only = false )
Get the content for the item
Get the content for the item
Prefers full content over summaries, but will return a summary if full
content does not exist.
To prefer summaries instead, use SimplePie_Item::get_description()
Uses <atom:content> or
<content:encoded> (RSS 1.0 Content Module)
Parameters
- $content_only
boolean - $content_only Should we avoid falling back to the description?
Returns
string|null
Since
1.0
|
public
SimplePie_Category |null
|
#
get_category( integer $key = 0 )
Get a category for the item
Get a category for the item
Parameters
- $key
integer - $key The category that you want to return. Remember that arrays begin with 0,
not 1
Returns
Since
Beta 3 (previously called get_categories() since Beta 2)
|
public
array|null
|
#
get_categories( )
Get all categories for the item
Get all categories for the item
Uses <atom:category> , <category> or
<dc:subject>
Returns
Since
Beta 3
|
public
SimplePie_Author |null
|
#
get_author( integer $key = 0 )
Get an author for the item
Get an author for the item
Parameters
- $key
integer - $key The author that you want to return. Remember that arrays begin with 0, not
1
Returns
Since
Beta 2
|
public
SimplePie_Author |null
|
#
get_contributor( integer $key = 0 )
Get a contributor for the item
Get a contributor for the item
Parameters
- $key
integer - $key The contrbutor that you want to return. Remember that arrays begin with 0,
not 1
Returns
Since
1.1
|
public
array|null
|
#
get_contributors( )
Get all contributors for the item
Get all contributors for the item
Uses <atom:contributor>
Returns
Since
1.1
|
public
array|null
|
#
get_authors( )
Get all authors for the item
Get all authors for the item
Uses <atom:author> , <author> ,
<dc:creator> or <itunes:author>
Returns
Since
Beta 2
|
public
string
|
#
get_copyright( )
Get the copyright info for the item
Get the copyright info for the item
Uses <atom:rights> or <dc:rights>
Returns
string
Since
1.1
|
public
integer|string|null
|
#
get_date( string $date_format = 'j F Y, g:i a' )
Get the posting date/time for the item
Get the posting date/time for the item
Uses <atom:published> , <atom:updated> ,
<atom:issued> , <atom:modified> ,
<pubDate> or <dc:date>
Note: obeys PHP's timezone setting. To get a UTC date/time, use SimplePie_Item::get_gmdate()
Parameters
- $date_format
string - $date_format Supports any PHP date format from http://php.net/date (empty for the raw data)
Returns
integer|string|null
Since
Beta 2 (previously called get_item_date since 0.8)
|
public
integer|string|null
|
#
get_updated_date( string $date_format = 'j F Y, g:i a' )
Get the update date/time for the item
Get the update date/time for the item
Uses <atom:updated>
Note: obeys PHP's timezone setting. To get a UTC date/time, use SimplePie_Item::get_gmdate()
Parameters
- $date_format
string - $date_format Supports any PHP date format from http://php.net/date (empty for the raw data)
Returns
integer|string|null
|
public
integer|string|null
|
#
get_local_date( string $date_format = '%c' )
Get the localized posting date/time for the item
Get the localized posting date/time for the item
Returns the date formatted in the localized language. To display in languages
other than the server's default, you need to change the locale with setlocale(). The
available localizations depend on which ones are installed on your web
server.
Parameters
- $date_format
string - $date_format Supports any PHP date format from http://php.net/strftime (empty for the raw
data)
Returns
integer|string|null
Since
1.0
|
public
integer|string|null
|
#
get_gmdate( string $date_format = 'j F Y, g:i a' )
Get the posting date/time for the item (UTC time)
Get the posting date/time for the item (UTC time)
Parameters
Returns
integer|string|null
See
|
public
integer|string|null
|
#
get_updated_gmdate( string $date_format = 'j F Y, g:i a' )
Get the update date/time for the item (UTC time)
Get the update date/time for the item (UTC time)
Parameters
Returns
integer|string|null
See
|
public
string|null
|
#
get_permalink( )
Get the permalink for the item
Get the permalink for the item
Returns the first link available with a relationship of "alternate".
Identical to SimplePie_Item::get_link() with key 0
Returns
string|null - Permalink URL
Since
0.8
See
|
public
string|null
|
#
get_link( integer $key = 0, string $rel = 'alternate' )
Get a single link for the item
Get a single link for the item
Parameters
- $key
integer - $key The link that you want to return. Remember that arrays begin with 0, not 1
- $rel
string - $rel The relationship of the link to return
Returns
string|null - Link URL
Since
Beta 3
|
public
array|null
|
#
get_links( string $rel = 'alternate' )
Get all links for the item
Get all links for the item
Uses <atom:link> , <link> or
<guid>
Parameters
- $rel
string - $rel The relationship of links to return
Returns
array|null - Links found for the item (strings)
Since
Beta 2
|
public
SimplePie_Enclosure |null
|
#
get_enclosure( integer $key = 0, mixed $prefer = null )
Get an enclosure from the item
Get an enclosure from the item
Supports the <enclosure> RSS tag, as well as Media RSS and iTunes
RSS.
Parameters
- $key
integer - $key The enclosure that you want to return. Remember that arrays begin with 0,
not 1
- $prefer
Returns
Since
Beta 2
|
public
array|null
|
#
get_enclosures( )
Get all available enclosures (podcasts, etc.)
Get all available enclosures (podcasts, etc.)
Supports the <enclosure> RSS tag, as well as Media RSS and iTunes
RSS.
At this point, we're pretty much assuming that all enclosures for an item are
the same content. Anything else is too complicated to properly support.
Returns
array|null - List of SimplePie_Enclosure items
Since
Beta 2
|
public
string|null
|
#
get_latitude( )
Get the latitude coordinates for the item
Get the latitude coordinates for the item
Compatible with the W3C WGS84 Basic Geo and GeoRSS specifications
Uses <geo:lat> or <georss:point>
Returns
string|null
Since
1.0
Link
|
public
string|null
|
#
get_longitude( )
Get the longitude coordinates for the item
Get the longitude coordinates for the item
Compatible with the W3C WGS84 Basic Geo and GeoRSS specifications
Uses <geo:long> , <geo:lon> or
<georss:point>
Returns
string|null
Since
1.0
Link
|
public
SimplePie_Source |null
|
#
get_source( )
Get the <atom:source> for the item
Get the <atom:source> for the item
Returns
Since
1.1
|