constructor SimplePie [line 706]
SimplePie SimplePie(
[string
$feed_url = null], [string
$cache_location = null], [int
$cache_duration = null])
|
|
The SimplePie class contains feed level data and options
There are two ways that you can create a new SimplePie object. The first is by passing a feed URL as a parameter to the SimplePie constructor (as well as optionally setting the cache location and cache expiry). This will initialise the whole feed with all of the default settings, and you can begin accessing methods and properties immediately.
The second way is to create the SimplePie object with no parameters at all. This will enable you to set configuration options. 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. This format is what is used throughout this documentation.
Tags:
Parameters:
destructor __destruct [line 741]
Remove items that link back to this before destroying this object
method enable_cache [line 899]
void enable_cache(
[bool
$enable = true])
|
|
Enables/disables caching in SimplePie.
This option allows you to disable caching all-together in SimplePie. However, disabling the cache can lead to longer load times.
Tags:
Parameters:
method enable_order_by_date [line 945]
void enable_order_by_date(
[bool
$enable = true])
|
|
Determines whether feed items should be sorted into reverse chronological order.
Tags:
Parameters:
method enable_xml_dump [line 884]
void enable_xml_dump(
[bool
$enable = false])
|
|
Outputs the raw XML content of the feed, after it has gone through SimplePie's filters.
Used only for debugging, this function will output the XML content as text/xml. When SimplePie reads in a feed, it does a bit of cleaning up before trying to parse it. Many parts of the feed are re-written in memory, and in the end, you have a parsable feed. XML dump shows you the actual XML that SimplePie tries to parse, which may or may not be very different from the original feed.
Tags:
Parameters:
method encode_instead_of_strip [line 1383]
void encode_instead_of_strip(
[
$enable = true])
|
|
Parameters:
method error [line 1813]
Return the error message for the occured error
Tags:
method force_feed [line 769]
void force_feed(
[bool
$enable = false])
|
|
Force the given data/URL to be treated as a feed no matter what it appears like
Tags:
Parameters:
method force_fsockopen [line 864]
void force_fsockopen(
[bool
$enable = false])
|
|
Forces SimplePie to use fsockopen() instead of the preferred cURL functions.
Tags:
Parameters:
method get_author [line 2371]
void get_author(
[
$key = 0])
|
|
Parameters:
method get_authors [line 2384]
method get_base [line 2255]
void get_base(
[
$element = array()])
|
|
Parameters:
method get_categories [line 2325]
method get_category [line 2312]
void get_category(
[
$key = 0])
|
|
Parameters:
method get_channel_tags [line 2176]
void get_channel_tags(
$namespace,
$tag)
|
|
Parameters:
method get_contributor [line 2454]
void get_contributor(
[
$key = 0])
|
|
Parameters:
method get_contributors [line 2467]
method get_copyright [line 2664]
method get_description [line 2620]
method get_encoding [line 1818]
method get_favicon [line 1927]
Returns the URL for the favicon of the feed's website.
Tags:
method get_feed_tags [line 2142]
void get_feed_tags(
$namespace,
$tag)
|
|
Parameters:
method get_image_height [line 2860]
method get_image_link [line 2824]
method get_image_tags [line 2219]
void get_image_tags(
$namespace,
$tag)
|
|
Parameters:
method get_image_title [line 2764]
method get_image_url [line 2792]
method get_image_width [line 2844]
method get_item [line 2889]
void get_item(
[
$key = 0])
|
|
Parameters:
method get_items [line 2902]
void get_items(
[
$start = 0], [
$end = 0])
|
|
Parameters:
method get_item_quantity [line 2876]
void get_item_quantity(
[
$max = 0])
|
|
Parameters:
method get_language [line 2692]
method get_latitude [line 2728]
method get_link [line 2525]
void get_link(
[
$key = 0], [
$rel = 'alternate'])
|
|
Parameters:
method get_links [line 2546]
void get_links(
[
$rel = 'alternate'])
|
|
Parameters:
method get_longitude [line 2744]
method get_permalink [line 2541]
Added for parity between the parent-level and the item/entry-level.
method get_title [line 2276]
method get_type [line 1840]
method handle_content_type [line 1823]
void handle_content_type(
[
$mime = 'text/html'])
|
|
Parameters:
method init [line 1469]
method merge_items [line 3003]
void merge_items(
$urls, [
$start = 0], [
$end = 0], [
$limit = 0])
|
|
Parameters:
method remove_div [line 1365]
void remove_div(
[
$enable = true])
|
|
Parameters:
method sanitize [line 2271]
void sanitize(
$data,
$type, [
$base = ''])
|
|
Parameters:
method set_author_class [line 1110]
void set_author_class(
[string
$class = 'SimplePie_Author'])
|
|
Allows you to change which class SimplePie uses for handling author data.
Useful when you are overloading or extending SimplePie's default classes.
Tags:
Parameters:
method set_autodiscovery_cache_duration [line 923]
void set_autodiscovery_cache_duration(
[int
$seconds = 604800])
|
|
Set the length of time (in seconds) that the autodiscovered feed URL will be cached.
Tags:
Parameters:
method set_autodiscovery_level [line 982]
void set_autodiscovery_level(
[int
$level = SIMPLEPIE_LOCATOR_ALL])
|
|
Set how much feed autodiscovery to do
Tags:
Parameters:
method set_cache_class [line 996]
void set_cache_class(
[string
$class = 'SimplePie_Cache'])
|
|
Allows you to change which class SimplePie uses for caching.
Useful when you are overloading or extending SimplePie's default classes.
Tags:
Parameters:
method set_cache_duration [line 911]
void set_cache_duration(
[int
$seconds = 3600])
|
|
Set the length of time (in seconds) that the contents of a feed will be cached.
Tags:
Parameters:
method set_cache_location [line 934]
void set_cache_location(
[string
$location = './cache'])
|
|
Set the file system location where the cached files should be stored.
Tags:
Parameters:
method set_cache_name_function [line 1308]
void set_cache_name_function(
[mixed
$function = 'md5'])
|
|
Set callback function to create cache filename with
Tags:
Parameters:
method set_caption_class [line 1167]
void set_caption_class(
[string
$class = 'SimplePie_Caption'])
|
|
Allows you to change which class SimplePie uses for <media:text> captions Useful when you are overloading or extending SimplePie's default classes.
Tags:
Parameters:
method set_category_class [line 1129]
void set_category_class(
[string
$class = 'SimplePie_Category'])
|
|
Allows you to change which class SimplePie uses for handling category data.
Useful when you are overloading or extending SimplePie's default classes.
Tags:
Parameters:
method set_content_type_sniffer_class [line 1262]
void set_content_type_sniffer_class(
[string
$class = 'SimplePie_Content_Type_Sniffer'])
|
|
Allows you to change which class SimplePie uses for content-type sniffing.
Useful when you are overloading or extending SimplePie's default classes.
Tags:
Parameters:
method set_copyright_class [line 1186]
void set_copyright_class(
[string
$class = 'SimplePie_Copyright'])
|
|
Allows you to change which class SimplePie uses for <media:copyright> Useful when you are overloading or extending SimplePie's default classes.
Tags:
Parameters:
method set_credit_class [line 1205]
void set_credit_class(
[string
$class = 'SimplePie_Credit'])
|
|
Allows you to change which class SimplePie uses for <media:credit> Useful when you are overloading or extending SimplePie's default classes.
Tags:
Parameters:
method set_enclosure_class [line 1148]
void set_enclosure_class(
[string
$class = 'SimplePie_Enclosure'])
|
|
Allows you to change which class SimplePie uses for feed enclosures.
Useful when you are overloading or extending SimplePie's default classes.
Tags:
Parameters:
method set_favicon_handler [line 1427]
void set_favicon_handler(
[str
$page = false], [str
$qs = 'i'])
|
|
Set the handler to enable the display of cached favicons.
Tags:
Parameters:
method set_feed_url [line 790]
void set_feed_url(
mixed
$url)
|
|
This is 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.
Tags:
Parameters:
method set_file [line 813]
bool set_file(
object
&$file)
|
|
Provides an instance of SimplePie_File to use as a feed
Tags:
Parameters:
method set_file_class [line 1053]
void set_file_class(
[string
$class = 'SimplePie_File'])
|
|
Allows you to change which class SimplePie uses for remote file fetching.
Useful when you are overloading or extending SimplePie's default classes.
Tags:
Parameters:
method set_image_handler [line 1446]
void set_image_handler(
[str
$page = false], [str
$qs = 'i'])
|
|
Set the handler to enable the display of cached images.
Tags:
Parameters:
method set_input_encoding [line 956]
void set_input_encoding(
[string
$encoding = false])
|
|
Allows you to override the character encoding reported by the feed.
Tags:
Parameters:
method set_item_class [line 1091]
void set_item_class(
[string
$class = 'SimplePie_Item'])
|
|
Allows you to change which class SimplePie uses for handling feed items.
Useful when you are overloading or extending SimplePie's default classes.
Tags:
Parameters:
method set_item_limit [line 1464]
void set_item_limit(
[integer
$limit = 0])
|
|
Set the limit for items returned per-feed with multifeeds.
Tags:
Parameters:
method set_javascript [line 1322]
void set_javascript(
[mixed
$get = 'js'])
|
|
Set javascript query string parameter
Tags:
Parameters:
method set_locator_class [line 1015]
void set_locator_class(
[string
$class = 'SimplePie_Locator'])
|
|
Allows you to change which class SimplePie uses for auto-discovery.
Useful when you are overloading or extending SimplePie's default classes.
Tags:
Parameters:
method set_max_checked_feeds [line 1360]
void set_max_checked_feeds(
[int
$max = 10])
|
|
Set maximum number of feeds to check with autodiscovery
Tags:
Parameters:
method set_output_encoding [line 1397]
void set_output_encoding(
[
$encoding = 'UTF-8'])
|
|
Parameters:
method set_parser_class [line 1034]
void set_parser_class(
[string
$class = 'SimplePie_Parser'])
|
|
Allows you to change which class SimplePie uses for XML parsing.
Useful when you are overloading or extending SimplePie's default classes.
Tags:
Parameters:
method set_rating_class [line 1224]
void set_rating_class(
[string
$class = 'SimplePie_Rating'])
|
|
Allows you to change which class SimplePie uses for <media:rating> Useful when you are overloading or extending SimplePie's default classes.
Tags:
Parameters:
method set_raw_data [line 836]
void set_raw_data(
string
$data)
|
|
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.
Tags:
Parameters:
method set_restriction_class [line 1243]
void set_restriction_class(
[string
$class = 'SimplePie_Restriction'])
|
|
Allows you to change which class SimplePie uses for <media:restriction> Useful when you are overloading or extending SimplePie's default classes.
Tags:
Parameters:
method set_sanitize_class [line 1072]
void set_sanitize_class(
[string
$class = 'SimplePie_Sanitize'])
|
|
Allows you to change which class SimplePie uses for data sanitization.
Useful when you are overloading or extending SimplePie's default classes.
Tags:
Parameters:
method set_source_class [line 1281]
void set_source_class(
[string
$class = 'SimplePie_Source'])
|
|
Allows you to change which class SimplePie uses item sources.
Useful when you are overloading or extending SimplePie's default classes.
Tags:
Parameters:
method set_stupidly_fast [line 1341]
void set_stupidly_fast(
[bool
$set = false])
|
|
Set options to make SP as fast as possible. Forgoes a substantial amount of data sanitization in favor of speed.
Tags:
Parameters:
method set_timeout [line 851]
void set_timeout(
[int
$timeout = 10])
|
|
Allows you to override 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.
Tags:
Parameters:
method set_url_replacements [line 1415]
void set_url_replacements(
[array
$element_attribute = array('a' => 'href', 'area' => 'href', 'blockquote' => 'cite', 'del' => 'cite', 'form' => 'action', 'img' => array('longdesc', 'src'),'input'=>'src','ins'=>'cite','q'=>'cite')])
|
|
Set element/attribute key/value pairs of HTML attributes containing URLs that need to be resolved relative to the feed
Tags:
Parameters:
method set_useragent [line 1297]
void set_useragent(
[string
$ua = SIMPLEPIE_USERAGENT])
|
|
Allows you to override the default user agent string.
Tags:
Parameters:
method sort_items [line 2998]
method strip_attributes [line 1388]
void strip_attributes(
[
$attribs = ''])
|
|
Parameters:
method strip_comments [line 1402]
void strip_comments(
[
$strip = false])
|
|
Parameters:
method strip_htmltags [line 1370]
void strip_htmltags(
[
$tags = ''], [
$encode = null])
|
|
Parameters:
method subscribe_aol [line 2067]
method subscribe_bloglines [line 2072]
void subscribe_bloglines(
)
|
|
method subscribe_eskobo [line 2077]
method subscribe_feed [line 1993]
method subscribe_feedfeeds [line 2082]
void subscribe_feedfeeds(
)
|
|
method subscribe_feedster [line 2087]
void subscribe_feedster(
)
|
|
method subscribe_google [line 2092]
method subscribe_gritwire [line 2097]
void subscribe_gritwire(
)
|
|
method subscribe_itunes [line 2029]
method subscribe_msn [line 2102]
method subscribe_netvibes [line 2107]
void subscribe_netvibes(
)
|
|
method subscribe_newsburst [line 2112]
void subscribe_newsburst(
)
|
|
method subscribe_newsgator [line 2117]
void subscribe_newsgator(
)
|
|
method subscribe_odeo [line 2122]
method subscribe_outlook [line 2005]
void subscribe_outlook(
)
|
|
method subscribe_podcast [line 2017]
void subscribe_podcast(
)
|
|
method subscribe_podnova [line 2127]
void subscribe_podnova(
)
|
|
method subscribe_rojo [line 2132]
method subscribe_url [line 1981]
method subscribe_yahoo [line 2137]
method __toString [line 733]
Used for converting object to a string