public
|
#
__construct( )
The SimplePie class contains feed level data and options
The SimplePie class contains feed level data and options
To use SimplePie, create the SimplePie object with no parameters. You can
then set configuration options using the provided methods. After setting them,
you must initialise the feed using $feed->init(). At that point the object's
methods and properties will be available to you.
Previously, it was possible to pass in the feed URL along with cache options
directly into the constructor. This has been removed as of 1.3 as it caused a
lot of confusion.
Since
1.0 Preview Release
|
public
|
#
__toString( )
Used for converting object to a string
Used for converting object to a 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
|
#
force_feed( boolean $enable = false )
Force the given data/URL to be treated as a feed
Force the given data/URL to be treated as a feed
This tells SimplePie to ignore the content-type provided by the server. Be
careful when using this option, as it will also disable autodiscovery.
Parameters
- $enable
boolean - $enable Force the given data/URL to be treated as a feed
Since
1.1
|
public
|
#
set_feed_url( string|array $url )
Set the URL of the feed you want to parse
Set the URL of the feed you want to parse
This allows you to enter the URL of the feed you want to parse, or the
website you want to try to use auto-discovery on. This takes priority over any
set raw data.
You can set multiple feeds to mash together by passing an array instead of a
string for the $url. Remember that with each additional feed comes additional
processing and resources.
Parameters
- $url
string|array - $url This is the URL (or array of URLs) that you want to parse.
Since
1.0 Preview Release
See
|
public
boolean
|
|
public
|
#
set_raw_data( string $data )
Set the raw XML data to parse
Set the raw XML data to parse
Allows you to use a string of RSS/Atom data instead of a remote feed.
If you have a feed available as a string in PHP, you can tell SimplePie to
parse that data string instead of a remote feed. Any set feed URL takes
precedence.
Parameters
- $data
string - $data RSS or Atom data as a string.
Since
1.0 Beta 3
See
|
public
|
#
set_timeout( integer $timeout = 10 )
Set the the default timeout for fetching remote feeds
Set the the default timeout for fetching remote feeds
This allows you to change the maximum time the feed's server to respond and
send the feed back.
Parameters
- $timeout
integer - $timeout The maximum number of seconds to spend waiting to retrieve a feed.
Since
1.0 Beta 3
|
public
|
#
force_fsockopen( boolean $enable = false )
Force SimplePie to use fsockopen() instead of cURL
Force SimplePie to use fsockopen() instead of cURL
Parameters
- $enable
boolean - $enable Force fsockopen() to be used
Since
1.0 Beta 3
|
public
|
#
enable_cache( boolean $enable = true )
Enable/disable caching in SimplePie.
Enable/disable caching in SimplePie.
This option allows you to disable caching all-together in SimplePie. However,
disabling the cache can lead to longer load times.
Parameters
- $enable
boolean - $enable Enable caching
Since
1.0 Preview Release
|
public
|
#
set_cache_duration( integer $seconds = 3600 )
Set the length of time (in seconds) that the contents of a feed will be
cached
Set the length of time (in seconds) that the contents of a feed will be
cached
Parameters
- $seconds
integer - $seconds The feed content cache duration
|
public
|
#
set_autodiscovery_cache_duration( integer $seconds = 604800 )
Set the length of time (in seconds) that the autodiscovered feed URL will be
cached
Set the length of time (in seconds) that the autodiscovered feed URL will be
cached
Parameters
- $seconds
integer - $seconds The autodiscovered feed URL cache duration.
|
public
|
#
set_cache_location( string $location = './cache' )
Set the file system location where the cached files should be stored
Set the file system location where the cached files should be stored
Parameters
- $location
string - $location The file system location.
|
public
|
#
enable_order_by_date( boolean $enable = true )
Set whether feed items should be sorted into reverse chronological order
Set whether feed items should be sorted into reverse chronological order
Parameters
- $enable
boolean - $enable Sort as reverse chronological order.
|
public
|
#
set_input_encoding( string $encoding = false )
Set the character encoding used to parse the feed
Set the character encoding used to parse the feed
This overrides the encoding reported by the feed, however it will fall back
to the normal encoding detection if the override fails
Parameters
- $encoding
string - $encoding Character encoding
|
public
|
#
set_autodiscovery_level( integer $level = SIMPLEPIE_LOCATOR_ALL )
Set how much feed autodiscovery to do
Set how much feed autodiscovery to do
Parameters
- $level
integer - $level Feed Autodiscovery Level (level can be a combination of the above
constants, see bitwise OR operator)
See
SIMPLEPIE_LOCATOR_NONE
SIMPLEPIE_LOCATOR_AUTODISCOVERY
SIMPLEPIE_LOCATOR_LOCAL_EXTENSION
SIMPLEPIE_LOCATOR_LOCAL_BODY
SIMPLEPIE_LOCATOR_REMOTE_EXTENSION
SIMPLEPIE_LOCATOR_REMOTE_BODY
SIMPLEPIE_LOCATOR_ALL
|
public
SimplePie_Registry
&
|
#
get_registry( )
Get the class registry
Use this to override SimplePie's default classes
Returns
See
|
public
boolean
|
#
set_cache_class( string $class = 'SimplePie_Cache' )
Set which class SimplePie uses for caching
Set which class SimplePie uses for caching
Deprecated
Parameters
- $class
string - $class Name of custom class
Returns
boolean - True on success, false otherwise
Link
|
public
boolean
|
#
set_locator_class( string $class = 'SimplePie_Locator' )
Set which class SimplePie uses for auto-discovery
Set which class SimplePie uses for auto-discovery
Deprecated
Parameters
- $class
string - $class Name of custom class
Returns
boolean - True on success, false otherwise
Link
|
public
boolean
|
#
set_parser_class( string $class = 'SimplePie_Parser' )
Set which class SimplePie uses for XML parsing
Set which class SimplePie uses for XML parsing
Deprecated
Parameters
- $class
string - $class Name of custom class
Returns
boolean - True on success, false otherwise
Link
|
public
boolean
|
#
set_file_class( string $class = 'SimplePie_File' )
Set which class SimplePie uses for remote file fetching
Set which class SimplePie uses for remote file fetching
Deprecated
Parameters
- $class
string - $class Name of custom class
Returns
boolean - True on success, false otherwise
Link
|
public
boolean
|
#
set_sanitize_class( string $class = 'SimplePie_Sanitize' )
Set which class SimplePie uses for data sanitization
Set which class SimplePie uses for data sanitization
Deprecated
Parameters
- $class
string - $class Name of custom class
Returns
boolean - True on success, false otherwise
Link
|
public
boolean
|
#
set_item_class( string $class = 'SimplePie_Item' )
Set which class SimplePie uses for handling feed items
Set which class SimplePie uses for handling feed items
Deprecated
Parameters
- $class
string - $class Name of custom class
Returns
boolean - True on success, false otherwise
Link
|
public
boolean
|
#
set_author_class( string $class = 'SimplePie_Author' )
Set which class SimplePie uses for handling author data
Set which class SimplePie uses for handling author data
Deprecated
Parameters
- $class
string - $class Name of custom class
Returns
boolean - True on success, false otherwise
Link
|
public
boolean
|
#
set_category_class( string $class = 'SimplePie_Category' )
Set which class SimplePie uses for handling category data
Set which class SimplePie uses for handling category data
Deprecated
Parameters
- $class
string - $class Name of custom class
Returns
boolean - True on success, false otherwise
Link
|
public
boolean
|
#
set_enclosure_class( string $class = 'SimplePie_Enclosure' )
Set which class SimplePie uses for feed enclosures
Set which class SimplePie uses for feed enclosures
Deprecated
Parameters
- $class
string - $class Name of custom class
Returns
boolean - True on success, false otherwise
Link
|
public
boolean
|
#
set_caption_class( string $class = 'SimplePie_Caption' )
Set which class SimplePie uses for <media:text>
captions
Set which class SimplePie uses for <media:text>
captions
Deprecated
Parameters
- $class
string - $class Name of custom class
Returns
boolean - True on success, false otherwise
Link
|
public
boolean
|
#
set_copyright_class( string $class = 'SimplePie_Copyright' )
Set which class SimplePie uses for <media:copyright>
Set which class SimplePie uses for <media:copyright>
Deprecated
Parameters
- $class
string - $class Name of custom class
Returns
boolean - True on success, false otherwise
Link
|
public
boolean
|
#
set_credit_class( string $class = 'SimplePie_Credit' )
Set which class SimplePie uses for <media:credit>
Set which class SimplePie uses for <media:credit>
Deprecated
Parameters
- $class
string - $class Name of custom class
Returns
boolean - True on success, false otherwise
Link
|
public
boolean
|
#
set_rating_class( string $class = 'SimplePie_Rating' )
Set which class SimplePie uses for <media:rating>
Set which class SimplePie uses for <media:rating>
Deprecated
Parameters
- $class
string - $class Name of custom class
Returns
boolean - True on success, false otherwise
Link
|
public
boolean
|
#
set_restriction_class( string $class = 'SimplePie_Restriction' )
Set which class SimplePie uses for <media:restriction>
Set which class SimplePie uses for <media:restriction>
Deprecated
Parameters
- $class
string - $class Name of custom class
Returns
boolean - True on success, false otherwise
Link
|
public
boolean
|
#
set_content_type_sniffer_class( string $class = 'SimplePie_Content_Type_Sniffer' )
Set which class SimplePie uses for content-type sniffing
Set which class SimplePie uses for content-type sniffing
Deprecated
Parameters
- $class
string - $class Name of custom class
Returns
boolean - True on success, false otherwise
Link
|
public
boolean
|
#
set_source_class( string $class = 'SimplePie_Source' )
Set which class SimplePie uses item sources
Set which class SimplePie uses item sources
Deprecated
Parameters
- $class
string - $class Name of custom class
Returns
boolean - True on success, false otherwise
Link
|
public
|
#
set_useragent( string $ua = SIMPLEPIE_USERAGENT )
Set the user agent string
Set the user agent string
Parameters
- $ua
string - $ua New user agent string.
|
public
|
#
set_cache_name_function( mixed $function = 'md5' )
Set callback function to create cache filename with
Set callback function to create cache filename with
Parameters
- $function
mixed - $function Callback function
|
public
|
#
set_stupidly_fast( boolean $set = false )
Set options to make SP as fast as possible
Set options to make SP as fast as possible
Forgoes a substantial amount of data sanitization in favor of speed. This
turns SimplePie into a dumb parser of feeds.
Parameters
- $set
boolean - $set Whether to set them or not
|
public
|
#
set_max_checked_feeds( integer $max = 10 )
Set maximum number of feeds to check with autodiscovery
Set maximum number of feeds to check with autodiscovery
Parameters
- $max
integer - $max Maximum number of feeds to check
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
#
set_output_encoding( string $encoding = 'UTF-8' )
Set the output encoding
Allows you to override SimplePie's output to match that of your webpage. This
is useful for times when your webpages are not being served as UTF-8. This
setting will be obeyed by SimplePie::handle_content_type() , and is similar to SimplePie::set_input_encoding() .
It should be noted, however, that not all character encodings can support all
characters. If your page is being served as ISO-8859-1 and you try to display a
Japanese feed, you'll likely see garbled characters. Because of this, it is
highly recommended to ensure that your webpages are served as UTF-8.
The number of supported character encodings depends on whether your web host
supports mbstring, iconv, or both. See http://simplepie.org/wiki/faq/Supported_Character_Encodings
for more information.
Parameters
- $encoding
string - $encoding
|
public
|
#
set_url_replacements( array|null $element_attribute = null )
Set element/attribute key/value pairs of HTML attributes containing URLs that
need to be resolved relative to the feed
Set element/attribute key/value pairs of HTML attributes containing URLs that
need to be resolved relative to the feed
Defaults to |a|@href, |area|@href, |blockquote|@cite, |del|@cite,
form |
@action, |
img |
@longdesc, |
img |
@src, |
input |
@src, |
ins |
@cite, |
q |
@cite |
|
|
|
|
|
|
|
|
Parameters
- $element_attribute
array|null - $element_attribute Element/attribute key/value pairs, null for default
Since
1.0
|
public
|
#
set_image_handler( str $page = false, str $qs = 'i' )
Set the handler to enable the display of cached images.
Set the handler to enable the display of cached images.
Parameters
- $page
str - $page Web-accessible path to the handler_image.php file.
- $qs
str - $qs The query string that the value should be passed to.
|
public
|
#
set_item_limit( integer $limit = 0 )
Set the limit for items returned per-feed with multifeeds
Set the limit for items returned per-feed with multifeeds
Parameters
- $limit
integer - $limit The maximum number of items to return.
|
public
boolean
|
#
init( )
Initialize the feed object
Initialize the feed object
This is what makes everything happen. Period. This is where all of the
configuration options get processed, feeds are fetched, cached, and parsed, and
all of that other good stuff.
Returns
boolean - True if successful, false otherwise
|
protected
array|true
|
#
fetch_data( SimplePie_Cache |false & $cache )
Fetch the data via SimplePie_File
Fetch the data via SimplePie_File
If the data is already cached, attempt to fetch it from there instead
Parameters
- $cache
SimplePie_Cache |false - $cache Cache handler, or false to not load from the cache
Returns
array|true - Returns true if the data was loaded from the cache, or an array of HTTP headers
and sniffed type
|
public
string|array
|
#
error( )
Get the error message for the occured error
Get the error message for the occured error
Returns
string|array - Error message, or array of messages for multifeeds
|
public
string|boolean
|
#
get_raw_data( )
Get the raw XML
This is the same as the old $feed->enable_xml_dump(true) , but
returns the data instead of printing it.
Returns
string|boolean - Raw XML data, false if the cache is used
|
public
string
|
#
get_encoding( )
Get the character encoding used for output
Get the character encoding used for output
Returns
string
Since
Preview Release
|
public
|
#
handle_content_type( string $mime = 'text/html' )
Send the content-type header with correct encoding
Send the content-type header with correct encoding
This method ensures that the SimplePie-enabled page is being served with the
correct mime-type and character encoding HTTP headers (character encoding determined by
the SimplePie::set_output_encoding() config option).
This won't work properly if any content or whitespace has already been sent
to the browser, because it relies on PHP's header() function, and
these are the circumstances under which the function works.
Because it's setting these settings for the entire page (as is the nature of
HTTP headers), this should only be used once per page (again, at the top).
Parameters
- $mime
string - $mime MIME type to serve the page as
|
public
integer
|
#
get_type( )
Get the type of the feed
This returns a SIMPLEPIE_TYPE_* constant, which can be tested against using
bitwise operators
Returns
integer - SIMPLEPIE_TYPE_* constant
Since
0.8 (usage changed to using constants in 1.0)
See
SIMPLEPIE_TYPE_NONE Unknown.
SIMPLEPIE_TYPE_RSS090 RSS 0.90.
SIMPLEPIE_TYPE_RSS091_NETSCAPE RSS 0.91 (Netscape).
SIMPLEPIE_TYPE_RSS091_USERLAND RSS 0.91 (Userland).
SIMPLEPIE_TYPE_RSS091 RSS 0.91.
SIMPLEPIE_TYPE_RSS092 RSS 0.92.
SIMPLEPIE_TYPE_RSS093 RSS 0.93.
SIMPLEPIE_TYPE_RSS094 RSS 0.94.
SIMPLEPIE_TYPE_RSS10 RSS 1.0.
SIMPLEPIE_TYPE_RSS20 RSS 2.0.x.
SIMPLEPIE_TYPE_RSS_RDF RDF-based RSS.
SIMPLEPIE_TYPE_RSS_SYNDICATION Non-RDF-based RSS (truly intended as syndication
format).
SIMPLEPIE_TYPE_RSS_ALL Any version of RSS.
SIMPLEPIE_TYPE_ATOM03 Atom 0.3.
SIMPLEPIE_TYPE_ATOM10 Atom 1.0.
SIMPLEPIE_TYPE_ATOM_ALL Any version of Atom.
SIMPLEPIE_TYPE_ALL Any known/supported feed type.
|
public
string|null
|
#
subscribe_url( )
Get the URL for the feed
May or may not be different from the URL passed to SimplePie::set_feed_url() ,
depending on whether auto-discovery was used.
Returns
string|null
Since
Preview Release (previously called get_feed_url() since SimplePie
0.8.)
|
public
array
|
#
get_feed_tags( string $namespace, string $tag )
Get data for an feed-level element
Get data for an feed-level element
This method allows you to get access to ANY element/attribute that is a
sub-element of the opening feed tag.
The return value is an indexed array of elements matching the given namespace
and tag name. Each element has attribs , data and
child subkeys. For attribs and child ,
these contain namespace subkeys. attribs then has one level of
associative name => value data (where value is a string) after
the namespace. child has tag-indexed keys after the namespace, each
member of which is an indexed array matching this same format.
For example:
// This is probably a bad example because we already support
// <media:content> natively, but it shows you how to parse through
// the nodes.
$group = $item->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'group');
$content = $group[0]['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['content'];
$file = $content[0]['attribs']['']['url'];
echo $file;
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
array
|
#
get_channel_tags( string $namespace, string $tag )
Get data for an channel-level element
Get data for an channel-level element
This method allows you to get access to ANY element/attribute in the
channel/header section of the feed.
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
array
|
#
get_image_tags( string $namespace, string $tag )
Get data for an channel-level element
Get data for an channel-level element
This method allows you to get access to ANY element/attribute in the
image/logo section of the feed.
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 feed
Get the base URL value from the feed
Uses <xml:base> if available, otherwise uses the first
link in the feed, or failing that, the URL of the feed itself.
Parameters
- $element
array - $element
Returns
string
See
|
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
string|null
|
#
get_title( )
Get the title of the feed
Get the title of the feed
Uses <atom:title> , <title> or
<dc:title>
Returns
string|null
Since
1.0 (previously called get_feed_title since 0.8)
|
public
SimplePie_Category |null
|
#
get_category( integer $key = 0 )
Get a category for the feed
Get a category for the feed
Parameters
- $key
integer - $key The category that you want to return. Remember that arrays begin with 0,
not 1
Returns
Since
Unknown
|
public
array|null
|
#
get_categories( )
Get all categories for the feed
Get all categories for the feed
Uses <atom:category> , <category> or
<dc:subject>
Returns
Since
Unknown
|
public
SimplePie_Author |null
|
#
get_author( integer $key = 0 )
Get an author for the feed
Get an author for the feed
Parameters
- $key
integer - $key The author that you want to return. Remember that arrays begin with 0, not
1
Returns
Since
1.1
|
public
array|null
|
#
get_authors( )
Get all authors for the feed
Get all authors for the feed
Uses <atom:author> , <author> ,
<dc:creator> or <itunes:author>
Returns
Since
1.1
|
public
SimplePie_Author |null
|
#
get_contributor( integer $key = 0 )
Get a contributor for the feed
Get a contributor for the feed
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 feed
Get all contributors for the feed
Uses <atom:contributor>
Returns
Since
1.1
|
public
string|null
|
#
get_link( integer $key = 0, string $rel = 'alternate' )
Get a single link for the feed
Get a single link for the feed
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
1.0 (previously called get_feed_link since Preview Release,
get_feed_permalink() since 0.8)
|
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::get_link() with key 0
Returns
string|null - Link URL
Since
1.0 (previously called get_feed_link since Preview Release,
get_feed_permalink() since 0.8)
See
|
public
array|null
|
#
get_links( string $rel = 'alternate' )
Get all links for the feed
Get all links for the feed
Uses <atom:link> or <link>
Parameters
- $rel
string - $rel The relationship of links to return
Returns
array|null - Links found for the feed (strings)
Since
Beta 2
|
public
|
|
public
string|null
|
#
get_description( )
Get the content for the item
Get the content for the item
Uses <atom:subtitle> , <atom:tagline> ,
<description> , <dc:description> ,
<itunes:summary> or <itunes:subtitle>
Returns
string|null
Since
1.0 (previously called get_feed_description() since 0.8)
|
public
string|null
|
#
get_copyright( )
Get the copyright info for the feed
Get the copyright info for the feed
Uses <atom:rights> , <atom:copyright> or
<dc:rights>
Returns
string|null
Since
1.0 (previously called get_feed_copyright() since 0.8)
|
public
string|null
|
#
get_language( )
Get the language for the feed
Get the language for the feed
Uses <language> , <dc:language> , or
@xml_lang
Returns
string|null
Since
1.0 (previously called get_feed_language() since 0.8)
|
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 feed
Get the longitude coordinates for the feed
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
string|null
|
#
get_image_title( )
Get the feed logo's title
Get the feed logo's title
RSS 0.9.0, 1.0 and 2.0 feeds are allowed to have a "feed logo" title.
Uses <image><title> or
<image><dc:title>
Returns
string|null
|
public
string|null
|
#
get_image_url( )
Get the feed logo's URL
RSS 0.9.0, 2.0, Atom 1.0, and feeds with iTunes RSS tags are allowed to have
a "feed logo" URL. This points directly to the image itself.
Uses <itunes:image> , <atom:logo> ,
<atom:icon> , <image><title> or
<image><dc:title>
Returns
string|null
|
public
string|null
|
#
get_image_link( )
Get the feed logo's link
RSS 0.9.0, 1.0 and 2.0 feeds are allowed to have a "feed logo" link. This
points to a human-readable page that the image should link to.
Uses <itunes:image> , <atom:logo> ,
<atom:icon> , <image><title> or
<image><dc:title>
Returns
string|null
|
public
integer|float|null
|
#
get_image_width( )
Get the feed logo's link
RSS 2.0 feeds are allowed to have a "feed logo" width.
Uses <image><width> or defaults to 88.0 if no width
is specified and the feed is an RSS 2.0 feed.
Returns
integer|float|null
|
public
integer|float|null
|
#
get_image_height( )
Get the feed logo's height
Get the feed logo's height
RSS 2.0 feeds are allowed to have a "feed logo" height.
Uses <image><height> or defaults to 31.0 if no
height is specified and the feed is an RSS 2.0 feed.
Returns
integer|float|null
|
public
integer
|
#
get_item_quantity( integer $max = 0 )
Get the number of items in the feed
Get the number of items in the feed
This is well-suited for for() loops with SimplePie::get_item()
Parameters
- $max
integer - $max Maximum value to return. 0 for no limit
Returns
integer - Number of items in the feed
|
public
SimplePie_Item |null
|
#
get_item( integer $key = 0 )
Get a single item from the feed
Get a single item from the feed
This is better suited for for() loops, whereas SimplePie::get_items() is better suited for foreach() loops.
Parameters
- $key
integer - $key The item that you want to return. Remember that arrays begin with 0, not 1
Returns
Since
Beta 2
See
|
public
array|null
|
#
get_items( integer $start = 0, integer $end = 0 )
Get all items from the feed
Get all items from the feed
This is better suited for for() loops, whereas SimplePie::get_items() is better suited for foreach() loops.
Parameters
- $start
integer - $start Index to start at
- $end
integer - $end Number of items to return. 0 for all items after $start
Returns
Since
Beta 2
See
|
public
|
#
set_favicon_handler( mixed $page = false, mixed $qs = 'i' )
Set the favicon handler
Deprecated
Use your own favicon handling instead
|
public
|
#
get_favicon( )
Get the favicon for the current feed
Get the favicon for the current feed
Deprecated
Use your own favicon handling instead
|
public
mixed
|
#
__call( string $method, array $args )
Magic method handler
Parameters
- $method
string - $method Method name
- $args
array - $args Arguments to the method
Returns
mixed
|
public static
boolean
|
|
public static
array
|
#
merge_items( array $urls, integer $start = 0, integer $end = 0, integer $limit = 0 )
Merge items from several feeds into one
Merge items from several feeds into one
If you're merging multiple feeds together, they need to all have dates for
the items or else SimplePie will refuse to sort them.
Parameters
- $urls
array - $urls List of SimplePie feed objects to merge
- $start
integer - $start Starting item
- $end
integer - $end Number of items to return
- $limit
integer - $limit Maximum number of items per feed
Returns
array
Link
|