[ Index ] |
PHP Cross Reference of DokuWiki |
[Source view] [Print] [Project Stats]
SimplePie A PHP-Based RSS and Atom Feed Framework. Takes the hard work out of managing a complete RSS/Atom solution.
Author: | Ryan Parman |
Author: | Geoffrey Sneddon |
Author: | Ryan McCue |
Copyright: | 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue |
License: | http://www.opensource.org/licenses/bsd-license.php BSD License |
Link: | http://simplepie.org/ SimplePie |
Version: | 1.3.1 |
File Size: | 17772 lines (447 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
SimplePie:: (88 methods):
__construct()
__toString()
__destruct()
force_feed()
set_feed_url()
set_file()
set_raw_data()
set_timeout()
force_fsockopen()
enable_cache()
set_cache_duration()
set_autodiscovery_cache_duration()
set_cache_location()
enable_order_by_date()
set_input_encoding()
set_autodiscovery_level()
get_registry()
set_cache_class()
set_locator_class()
set_parser_class()
set_file_class()
set_sanitize_class()
set_item_class()
set_author_class()
set_category_class()
set_enclosure_class()
set_caption_class()
set_copyright_class()
set_credit_class()
set_rating_class()
set_restriction_class()
set_content_type_sniffer_class()
set_source_class()
set_useragent()
set_cache_name_function()
set_stupidly_fast()
set_max_checked_feeds()
remove_div()
strip_htmltags()
encode_instead_of_strip()
strip_attributes()
set_output_encoding()
strip_comments()
set_url_replacements()
set_image_handler()
set_item_limit()
init()
fetch_data()
error()
get_raw_data()
get_encoding()
handle_content_type()
get_type()
subscribe_url()
get_feed_tags()
get_channel_tags()
get_image_tags()
get_base()
sanitize()
get_title()
get_category()
get_categories()
get_author()
get_authors()
get_contributor()
get_contributors()
get_link()
get_permalink()
get_links()
get_all_discovered_feeds()
get_description()
get_copyright()
get_language()
get_latitude()
get_longitude()
get_image_title()
get_image_url()
get_image_link()
get_image_width()
get_image_height()
get_item_quantity()
get_item()
get_items()
set_favicon_handler()
get_favicon()
__call()
sort_items()
merge_items()
SimplePie_Author:: (5 methods):
__construct()
__toString()
get_name()
get_link()
get_email()
SimplePie_Cache_Base:: (6 methods):
__construct()
save()
load()
mtime()
touch()
unlink()
SimplePie_Cache_DB:: (1 method):
prepare_simplepie_object_for_cache()
SimplePie_Cache_File:: (6 methods):
__construct()
save()
load()
mtime()
touch()
unlink()
SimplePie_Cache_Memcache:: (6 methods):
__construct()
save()
load()
mtime()
touch()
unlink()
SimplePie_Cache_MySQL:: (6 methods):
__construct()
save()
load()
mtime()
touch()
unlink()
SimplePie_Cache:: (5 methods):
__construct()
get_handler()
create()
register()
parse_URL()
SimplePie_Caption:: (7 methods):
__construct()
__toString()
get_endtime()
get_language()
get_starttime()
get_text()
get_type()
SimplePie_Category:: (5 methods):
__construct()
__toString()
get_term()
get_scheme()
get_label()
SimplePie_Content_Type_Sniffer:: (6 methods):
__construct()
get_type()
text_or_binary()
unknown()
image()
feed_or_html()
SimplePie_Copyright:: (4 methods):
__construct()
__toString()
get_url()
get_attribution()
SimplePie_Core:: (0 methods):
SimplePie_Credit:: (5 methods):
__construct()
__toString()
get_role()
get_scheme()
get_name()
SimplePie_Decode_HTML_Entities:: (6 methods):
__construct()
parse()
consume()
consume_range()
unconsume()
entity()
SimplePie_Enclosure:: (41 methods):
__construct()
__toString()
get_bitrate()
get_caption()
get_captions()
get_category()
get_categories()
get_channels()
get_copyright()
get_credit()
get_credits()
get_description()
get_duration()
get_expression()
get_extension()
get_framerate()
get_handler()
get_hash()
get_hashes()
get_height()
get_language()
get_keyword()
get_keywords()
get_length()
get_link()
get_medium()
get_player()
get_rating()
get_ratings()
get_restriction()
get_restrictions()
get_sampling_rate()
get_size()
get_thumbnail()
get_thumbnails()
get_title()
get_type()
get_width()
native_embed()
embed()
get_real_type()
SimplePie_Exception:: (0 methods):
SimplePie_File:: (1 method):
__construct()
SimplePie_gzdecode:: (3 methods):
__set()
__construct()
parse()
SimplePie_HTTP_Parser:: (17 methods):
__construct()
parse()
has_data()
is_linear_whitespace()
http_version()
status()
reason()
new_line()
name()
linear_whitespace()
value()
value_char()
quote()
quote_char()
quote_escaped()
body()
chunked()
SimplePie_IRI:: (27 methods):
__toString()
__set()
__get()
__isset()
__unset()
__construct()
absolutize()
parse_iri()
remove_dot_segments()
replace_invalid_with_pct_encoding()
remove_iunreserved_percent_encoded()
scheme_normalization()
is_valid()
set_iri()
set_scheme()
set_authority()
set_userinfo()
set_host()
set_port()
set_path()
set_query()
set_fragment()
to_uri()
get_iri()
get_uri()
get_iauthority()
get_authority()
SimplePie_Item:: (32 methods):
__construct()
set_registry()
__toString()
__destruct()
get_item_tags()
get_base()
sanitize()
get_feed()
get_id()
get_title()
get_description()
get_content()
get_category()
get_categories()
get_author()
get_contributor()
get_contributors()
get_authors()
get_copyright()
get_date()
get_updated_date()
get_local_date()
get_gmdate()
get_updated_gmdate()
get_permalink()
get_link()
get_links()
get_enclosure()
get_enclosures()
get_latitude()
get_longitude()
get_source()
SimplePie_Locator:: (10 methods):
__construct()
set_registry()
find()
is_feed()
get_base()
autodiscovery()
search_elements_by_tag()
get_links()
extension()
body()
SimplePie_Misc:: (37 methods):
time_hms()
absolutize_url()
get_element()
element_implode()
error()
fix_protocol()
parse_url()
compress_parse_url()
normalize_url()
percent_encoding_normalization()
windows_1252_to_utf8()
change_encoding()
change_encoding_mbstring()
change_encoding_iconv()
encoding()
get_curl_version()
strip_comments()
parse_date()
entities_decode()
uncomment_rfc822()
parse_mime()
atom_03_construct_type()
atom_10_construct_type()
atom_10_content_construct_type()
is_isegment_nz_nc()
space_seperated_tokens()
codepoint_to_utf8()
parse_str()
xml_encoding()
output_javascript()
embed_quicktime()
embed_flash()
embed_flv()
embed_wmedia()
get_build()
debug()
silence_errors()
SimplePie_Net_IPv6:: (5 methods):
uncompress()
compress()
split_v6_v4()
check_ipv6()
checkIPv6()
SimplePie_Parse_Date:: (10 methods):
__construct()
get()
parse()
add_callback()
date_w3cdtf()
remove_rfc2822_comments()
date_rfc2822()
date_rfc850()
date_asctime()
date_strtotime()
SimplePie_Parser:: (12 methods):
set_registry()
parse()
get_error_code()
get_error_string()
get_current_line()
get_current_column()
get_current_byte()
get_data()
tag_open()
cdata()
tag_close()
split_ns()
SimplePie_Rating:: (4 methods):
__construct()
__toString()
get_scheme()
get_value()
SimplePie_Registry:: (5 methods):
__construct()
register()
get_class()
create()
call()
SimplePie_Restriction:: (5 methods):
__construct()
__toString()
get_relationship()
get_type()
get_value()
SimplePie_Sanitize:: (18 methods):
__construct()
remove_div()
set_image_handler()
set_registry()
pass_cache_data()
pass_file_data()
strip_htmltags()
encode_instead_of_strip()
strip_attributes()
strip_comments()
set_output_encoding()
set_url_replacements()
sanitize()
preprocess()
replace_urls()
do_strip_htmltags()
strip_tag()
strip_attr()
SimplePie_Source:: (23 methods):
__construct()
set_registry()
__toString()
get_source_tags()
get_base()
sanitize()
get_item()
get_title()
get_category()
get_categories()
get_author()
get_authors()
get_contributor()
get_contributors()
get_link()
get_permalink()
get_links()
get_description()
get_copyright()
get_language()
get_latitude()
get_longitude()
get_image_url()
SimplePie_XML_Declaration_Parser:: (15 methods):
__construct()
parse()
has_data()
skip_whitespace()
get_value()
before_version_name()
version_name()
version_equals()
version_value()
encoding_name()
encoding_equals()
encoding_value()
standalone_name()
standalone_equals()
standalone_value()
__construct() X-Ref |
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. |
__toString() X-Ref |
Used for converting object to a string |
__destruct() X-Ref |
Remove items that link back to this before destroying this object |
force_feed($enable = false) X-Ref |
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. param: bool $enable Force the given data/URL to be treated as a feed |
set_feed_url($url) X-Ref |
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. param: string|array $url This is the URL (or array of URLs) that you want to parse. see: set_raw_data() |
set_file(&$file) X-Ref |
Set an instance of {@see SimplePie_File} to use as a feed param: SimplePie_File &$file return: bool True on success, false on failure |
set_raw_data($data) X-Ref |
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. param: string $data RSS or Atom data as a string. see: set_feed_url() |
set_timeout($timeout = 10) X-Ref |
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. param: int $timeout The maximum number of seconds to spend waiting to retrieve a feed. |
force_fsockopen($enable = false) X-Ref |
Force SimplePie to use fsockopen() instead of cURL param: bool $enable Force fsockopen() to be used |
enable_cache($enable = true) X-Ref |
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. param: bool $enable Enable caching |
set_cache_duration($seconds = 3600) X-Ref |
Set the length of time (in seconds) that the contents of a feed will be cached param: int $seconds The feed content cache duration |
set_autodiscovery_cache_duration($seconds = 604800) X-Ref |
Set the length of time (in seconds) that the autodiscovered feed URL will be cached param: int $seconds The autodiscovered feed URL cache duration. |
set_cache_location($location = './cache') X-Ref |
Set the file system location where the cached files should be stored param: string $location The file system location. |
enable_order_by_date($enable = true) X-Ref |
Set whether feed items should be sorted into reverse chronological order param: bool $enable Sort as reverse chronological order. |
set_input_encoding($encoding = false) X-Ref |
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 param: string $encoding Character encoding |
set_autodiscovery_level($level = SIMPLEPIE_LOCATOR_ALL) X-Ref |
Set how much feed autodiscovery to do param: int $level Feed Autodiscovery Level (level can be a combination of the above constants, see bitwise OR operator) see: SIMPLEPIE_LOCATOR_NONE see: SIMPLEPIE_LOCATOR_AUTODISCOVERY see: SIMPLEPIE_LOCATOR_LOCAL_EXTENSION see: SIMPLEPIE_LOCATOR_LOCAL_BODY see: SIMPLEPIE_LOCATOR_REMOTE_EXTENSION see: SIMPLEPIE_LOCATOR_REMOTE_BODY see: SIMPLEPIE_LOCATOR_ALL |
get_registry() X-Ref |
Get the class registry Use this to override SimplePie's default classes return: SimplePie_Registry see: SimplePie_Registry |
set_cache_class($class = 'SimplePie_Cache') X-Ref |
Set which class SimplePie uses for caching |
set_locator_class($class = 'SimplePie_Locator') X-Ref |
Set which class SimplePie uses for auto-discovery |
set_parser_class($class = 'SimplePie_Parser') X-Ref |
Set which class SimplePie uses for XML parsing |
set_file_class($class = 'SimplePie_File') X-Ref |
Set which class SimplePie uses for remote file fetching |
set_sanitize_class($class = 'SimplePie_Sanitize') X-Ref |
Set which class SimplePie uses for data sanitization |
set_item_class($class = 'SimplePie_Item') X-Ref |
Set which class SimplePie uses for handling feed items |
set_author_class($class = 'SimplePie_Author') X-Ref |
Set which class SimplePie uses for handling author data |
set_category_class($class = 'SimplePie_Category') X-Ref |
Set which class SimplePie uses for handling category data |
set_enclosure_class($class = 'SimplePie_Enclosure') X-Ref |
Set which class SimplePie uses for feed enclosures |
set_caption_class($class = 'SimplePie_Caption') X-Ref |
Set which class SimplePie uses for `<media:text>` captions |
set_copyright_class($class = 'SimplePie_Copyright') X-Ref |
Set which class SimplePie uses for `<media:copyright>` |
set_credit_class($class = 'SimplePie_Credit') X-Ref |
Set which class SimplePie uses for `<media:credit>` |
set_rating_class($class = 'SimplePie_Rating') X-Ref |
Set which class SimplePie uses for `<media:rating>` |
set_restriction_class($class = 'SimplePie_Restriction') X-Ref |
Set which class SimplePie uses for `<media:restriction>` |
set_content_type_sniffer_class($class = 'SimplePie_Content_Type_Sniffer') X-Ref |
Set which class SimplePie uses for content-type sniffing |
set_source_class($class = 'SimplePie_Source') X-Ref |
Set which class SimplePie uses item sources |
set_useragent($ua = SIMPLEPIE_USERAGENT) X-Ref |
Set the user agent string param: string $ua New user agent string. |
set_cache_name_function($function = 'md5') X-Ref |
Set callback function to create cache filename with param: mixed $function Callback function |
set_stupidly_fast($set = false) X-Ref |
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. param: bool $set Whether to set them or not |
set_max_checked_feeds($max = 10) X-Ref |
Set maximum number of feeds to check with autodiscovery param: int $max Maximum number of feeds to check |
remove_div($enable = true) X-Ref |
No description |
strip_htmltags($tags = '', $encode = null) X-Ref |
No description |
encode_instead_of_strip($enable = true) X-Ref |
No description |
strip_attributes($attribs = '') X-Ref |
No description |
set_output_encoding($encoding = 'UTF-8') X-Ref |
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 {@see handle_content_type()}, and is similar to {@see 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 {@link http://php.net/mbstring mbstring}, {@link http://php.net/iconv iconv}, or both. See {@link http://simplepie.org/wiki/faq/Supported_Character_Encodings} for more information. param: string $encoding |
strip_comments($strip = false) X-Ref |
No description |
set_url_replacements($element_attribute = null) X-Ref |
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 param: array|null $element_attribute Element/attribute key/value pairs, null for default |
set_image_handler($page = false, $qs = 'i') X-Ref |
Set the handler to enable the display of cached images. param: str $page Web-accessible path to the handler_image.php file. param: str $qs The query string that the value should be passed to. |
set_item_limit($limit = 0) X-Ref |
Set the limit for items returned per-feed with multifeeds param: integer $limit The maximum number of items to return. |
init() X-Ref |
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. return: boolean True if successful, false otherwise |
fetch_data(&$cache) X-Ref |
Fetch the data via SimplePie_File If the data is already cached, attempt to fetch it from there instead param: SimplePie_Cache|false $cache Cache handler, or false to not load from the cache return: array|true Returns true if the data was loaded from the cache, or an array of HTTP headers and sniffed type |
error() X-Ref |
Get the error message for the occured error return: string|array Error message, or array of messages for multifeeds |
get_raw_data() X-Ref |
Get the raw XML This is the same as the old `$feed->enable_xml_dump(true)`, but returns the data instead of printing it. return: string|boolean Raw XML data, false if the cache is used |
get_encoding() X-Ref |
Get the character encoding used for output return: string |
handle_content_type($mime = 'text/html') X-Ref |
Send the content-type header with correct encoding This method ensures that the SimplePie-enabled page is being served with the correct {@link http://www.iana.org/assignments/media-types/ mime-type} and character encoding HTTP headers (character encoding determined by the {@see 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 {@link http://php.net/header 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). param: string $mime MIME type to serve the page as |
get_type() X-Ref |
Get the type of the feed This returns a SIMPLEPIE_TYPE_* constant, which can be tested against using {@link http://php.net/language.operators.bitwise bitwise operators} return: int SIMPLEPIE_TYPE_* constant see: SIMPLEPIE_TYPE_NONE Unknown. see: SIMPLEPIE_TYPE_RSS_090 RSS 0.90. see: SIMPLEPIE_TYPE_RSS_091_NETSCAPE RSS 0.91 (Netscape). see: SIMPLEPIE_TYPE_RSS_091_USERLAND RSS 0.91 (Userland). see: SIMPLEPIE_TYPE_RSS_091 RSS 0.91. see: SIMPLEPIE_TYPE_RSS_092 RSS 0.92. see: SIMPLEPIE_TYPE_RSS_093 RSS 0.93. see: SIMPLEPIE_TYPE_RSS_094 RSS 0.94. see: SIMPLEPIE_TYPE_RSS_10 RSS 1.0. see: SIMPLEPIE_TYPE_RSS_20 RSS 2.0.x. see: SIMPLEPIE_TYPE_RSS_RDF RDF-based RSS. see: SIMPLEPIE_TYPE_RSS_SYNDICATION Non-RDF-based RSS (truly intended as syndication format). see: SIMPLEPIE_TYPE_RSS_ALL Any version of RSS. see: SIMPLEPIE_TYPE_ATOM_03 Atom 0.3. see: SIMPLEPIE_TYPE_ATOM_10 Atom 1.0. see: SIMPLEPIE_TYPE_ATOM_ALL Any version of Atom. see: SIMPLEPIE_TYPE_ALL Any known/supported feed type. |
subscribe_url() X-Ref |
Get the URL for the feed May or may not be different from the URL passed to {@see set_feed_url()}, depending on whether auto-discovery was used. return: string|null |
get_feed_tags($namespace, $tag) X-Ref |
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: <pre> // 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; </pre> param: string $namespace The URL of the XML namespace of the elements you're trying to access param: string $tag Tag name return: array see: http://simplepie.org/wiki/faq/supported_xml_namespaces |
get_channel_tags($namespace, $tag) X-Ref |
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 {@see SimplePie::get_feed_tags()} for a description of the return value param: string $namespace The URL of the XML namespace of the elements you're trying to access param: string $tag Tag name return: array see: http://simplepie.org/wiki/faq/supported_xml_namespaces |
get_image_tags($namespace, $tag) X-Ref |
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 {@see SimplePie::get_feed_tags()} for a description of the return value param: string $namespace The URL of the XML namespace of the elements you're trying to access param: string $tag Tag name return: array see: http://simplepie.org/wiki/faq/supported_xml_namespaces |
get_base($element = array() X-Ref |
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. param: array $element return: string see: get_link see: subscribe_url |
sanitize($data, $type, $base = '') X-Ref |
Sanitize feed data param: string $data Data to sanitize param: int $type One of the SIMPLEPIE_CONSTRUCT_* constants param: string $base Base URL to resolve URLs against return: string Sanitized data see: SimplePie_Sanitize::sanitize() |
get_title() X-Ref |
Get the title of the feed Uses `<atom:title>`, `<title>` or `<dc:title>` return: string|null |
get_category($key = 0) X-Ref |
Get a category for the feed param: int $key The category that you want to return. Remember that arrays begin with 0, not 1 return: SimplePie_Category|null |
get_categories() X-Ref |
Get all categories for the feed Uses `<atom:category>`, `<category>` or `<dc:subject>` return: array|null List of {@see SimplePie_Category} objects |
get_author($key = 0) X-Ref |
Get an author for the feed param: int $key The author that you want to return. Remember that arrays begin with 0, not 1 return: SimplePie_Author|null |
get_authors() X-Ref |
Get all authors for the feed Uses `<atom:author>`, `<author>`, `<dc:creator>` or `<itunes:author>` return: array|null List of {@see SimplePie_Author} objects |
get_contributor($key = 0) X-Ref |
Get a contributor for the feed param: int $key The contrbutor that you want to return. Remember that arrays begin with 0, not 1 return: SimplePie_Author|null |
get_contributors() X-Ref |
Get all contributors for the feed Uses `<atom:contributor>` return: array|null List of {@see SimplePie_Author} objects |
get_link($key = 0, $rel = 'alternate') X-Ref |
Get a single link for the feed param: int $key The link that you want to return. Remember that arrays begin with 0, not 1 param: string $rel The relationship of the link to return return: string|null Link URL |
get_permalink() X-Ref |
Get the permalink for the item Returns the first link available with a relationship of "alternate". Identical to {@see get_link()} with key 0 return: string|null Link URL see: get_link |
get_links($rel = 'alternate') X-Ref |
Get all links for the feed Uses `<atom:link>` or `<link>` param: string $rel The relationship of links to return return: array|null Links found for the feed (strings) |
get_all_discovered_feeds() X-Ref |
No description |
get_description() X-Ref |
Get the content for the item Uses `<atom:subtitle>`, `<atom:tagline>`, `<description>`, `<dc:description>`, `<itunes:summary>` or `<itunes:subtitle>` return: string|null |
get_copyright() X-Ref |
Get the copyright info for the feed Uses `<atom:rights>`, `<atom:copyright>` or `<dc:rights>` return: string|null |
get_language() X-Ref |
Get the language for the feed Uses `<language>`, `<dc:language>`, or @xml_lang return: string|null |
get_latitude() X-Ref |
Get the latitude coordinates for the item Compatible with the W3C WGS84 Basic Geo and GeoRSS specifications Uses `<geo:lat>` or `<georss:point>` link: http://www.w3.org/2003/01/geo/ W3C WGS84 Basic Geo link: http://www.georss.org/ GeoRSS return: string|null |
get_longitude() X-Ref |
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>` link: http://www.w3.org/2003/01/geo/ W3C WGS84 Basic Geo link: http://www.georss.org/ GeoRSS return: string|null |
get_image_title() X-Ref |
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>` return: string|null |
get_image_url() X-Ref |
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>` return: string|null |
get_image_link() X-Ref |
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>` return: string|null |
get_image_width() X-Ref |
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. return: int|float|null |
get_image_height() X-Ref |
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. return: int|float|null |
get_item_quantity($max = 0) X-Ref |
Get the number of items in the feed This is well-suited for {@link http://php.net/for for()} loops with {@see get_item()} param: int $max Maximum value to return. 0 for no limit return: int Number of items in the feed |
get_item($key = 0) X-Ref |
Get a single item from the feed This is better suited for {@link http://php.net/for for()} loops, whereas {@see get_items()} is better suited for {@link http://php.net/foreach foreach()} loops. param: int $key The item that you want to return. Remember that arrays begin with 0, not 1 return: SimplePie_Item|null see: get_item_quantity() |
get_items($start = 0, $end = 0) X-Ref |
Get all items from the feed This is better suited for {@link http://php.net/for for()} loops, whereas {@see get_items()} is better suited for {@link http://php.net/foreach foreach()} loops. param: int $start Index to start at param: int $end Number of items to return. 0 for all items after `$start` return: array|null List of {@see SimplePie_Item} objects see: get_item_quantity |
set_favicon_handler($page = false, $qs = 'i') X-Ref |
Set the favicon handler |
get_favicon() X-Ref |
Get the favicon for the current feed |
__call($method, $args) X-Ref |
Magic method handler param: string $method Method name param: array $args Arguments to the method return: mixed |
sort_items($a, $b) X-Ref |
Sorting callback for items param: SimplePie $a param: SimplePie $b return: boolean |
merge_items($urls, $start = 0, $end = 0, $limit = 0) X-Ref |
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. link: http://simplepie.org/wiki/tutorial/sort_multiple_feeds_by_time_and_date#if_feeds_require_separate_per-feed_settings param: array $urls List of SimplePie feed objects to merge param: int $start Starting item param: int $end Number of items to return param: int $limit Maximum number of items per feed return: array |
Class: SimplePie_Author - X-Ref
Manages all author-related data__construct($name = null, $link = null, $email = null) X-Ref |
Constructor, used to input the data param: string $name param: string $link param: string $email |
__toString() X-Ref |
String-ified version return: string |
get_name() X-Ref |
Author's name return: string|null |
get_link() X-Ref |
Author's link return: string|null |
get_email() X-Ref |
Author's email address return: string|null |
Interface: SimplePie_Cache_Base - X-Ref
Base for cache objects__construct($location, $name, $type) X-Ref |
Create a new cache object param: string $location Location string (from SimplePie::$cache_location) param: string $name Unique ID for the cache param: string $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data |
save($data) X-Ref |
Save data to the cache param: array|SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property return: bool Successfulness |
load() X-Ref |
Retrieve the data saved to the cache return: array Data for SimplePie::$data |
mtime() X-Ref |
Retrieve the last modified time for the cache return: int Timestamp |
touch() X-Ref |
Set the last modified time to the current time return: bool Success status |
unlink() X-Ref |
Remove the cache return: bool Success status |
Class: SimplePie_Cache_DB - X-Ref
Base class for database-based cachesprepare_simplepie_object_for_cache($data) X-Ref |
Helper for database conversion Converts a given {@see SimplePie} object into data to be stored param: SimplePie $data return: array First item is the serialized data for storage, second item is the unique ID for this item |
Class: SimplePie_Cache_File - X-Ref
Caches data to the filesystem__construct($location, $name, $type) X-Ref |
Create a new cache object param: string $location Location string (from SimplePie::$cache_location) param: string $name Unique ID for the cache param: string $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data |
save($data) X-Ref |
Save data to the cache param: array|SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property return: bool Successfulness |
load() X-Ref |
Retrieve the data saved to the cache return: array Data for SimplePie::$data |
mtime() X-Ref |
Retrieve the last modified time for the cache return: int Timestamp |
touch() X-Ref |
Set the last modified time to the current time return: bool Success status |
unlink() X-Ref |
Remove the cache return: bool Success status |
Class: SimplePie_Cache_Memcache - X-Ref
Caches data to memcache__construct($location, $name, $type) X-Ref |
Create a new cache object param: string $location Location string (from SimplePie::$cache_location) param: string $name Unique ID for the cache param: string $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data |
save($data) X-Ref |
Save data to the cache param: array|SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property return: bool Successfulness |
load() X-Ref |
Retrieve the data saved to the cache return: array Data for SimplePie::$data |
mtime() X-Ref |
Retrieve the last modified time for the cache return: int Timestamp |
touch() X-Ref |
Set the last modified time to the current time return: bool Success status |
unlink() X-Ref |
Remove the cache return: bool Success status |
Class: SimplePie_Cache_MySQL - X-Ref
Caches data to a MySQL database__construct($location, $name, $type) X-Ref |
Create a new cache object param: string $location Location string (from SimplePie::$cache_location) param: string $name Unique ID for the cache param: string $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data |
save($data) X-Ref |
Save data to the cache param: array|SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property return: bool Successfulness |
load() X-Ref |
Retrieve the data saved to the cache return: array Data for SimplePie::$data |
mtime() X-Ref |
Retrieve the last modified time for the cache return: int Timestamp |
touch() X-Ref |
Set the last modified time to the current time return: bool Success status |
unlink() X-Ref |
Remove the cache return: bool Success status |
Class: SimplePie_Cache - X-Ref
Used to create cache objects__construct() X-Ref |
Don't call the constructor. Please. |
get_handler($location, $filename, $extension) X-Ref |
Create a new SimplePie_Cache object param: string $location URL location (scheme is used to determine handler) param: string $filename Unique identifier for cache object param: string $extension 'spi' or 'spc' return: SimplePie_Cache_Base Type of object depends on scheme of `$location` |
create($location, $filename, $extension) X-Ref |
Create a new SimplePie_Cache object |
register($type, $class) X-Ref |
Register a handler param: string $type DSN type to register for param: string $class Name of handler class. Must implement SimplePie_Cache_Base |
parse_URL($url) X-Ref |
Parse a URL into an array param: string $url return: array |
Class: SimplePie_Caption - X-Ref
Handles `<media:text>` captions as defined in Media RSS.__construct($type = null, $lang = null, $startTime = null, $endTime = null, $text = null) X-Ref |
Constructor, used to input the data For documentation on all the parameters, see the corresponding properties and their accessors |
__toString() X-Ref |
String-ified version return: string |
get_endtime() X-Ref |
Get the end time return: string|null Time in the format 'hh:mm:ss.SSS' |
get_language() X-Ref |
Get the language link: http://tools.ietf.org/html/rfc3066 return: string|null Language code as per RFC 3066 |
get_starttime() X-Ref |
Get the start time return: string|null Time in the format 'hh:mm:ss.SSS' |
get_text() X-Ref |
Get the text of the caption return: string|null |
get_type() X-Ref |
Get the content type (not MIME type) return: string|null Either 'text' or 'html' |
Class: SimplePie_Category - X-Ref
Manages all category-related data__construct($term = null, $scheme = null, $label = null) X-Ref |
Constructor, used to input the data param: string $term param: string $scheme param: string $label |
__toString() X-Ref |
String-ified version return: string |
get_term() X-Ref |
Get the category identifier return: string|null |
get_scheme() X-Ref |
Get the categorization scheme identifier return: string|null |
get_label() X-Ref |
Get the human readable label return: string|null |
Class: SimplePie_Content_Type_Sniffer - X-Ref
Content-type sniffing__construct($file) X-Ref |
Create an instance of the class with the input file param: SimplePie_Content_Type_Sniffer $file Input file |
get_type() X-Ref |
Get the Content-Type of the specified file return: string Actual Content-Type |
text_or_binary() X-Ref |
Sniff text or binary return: string Actual Content-Type |
unknown() X-Ref |
Sniff unknown return: string Actual Content-Type |
image() X-Ref |
Sniff images return: string Actual Content-Type |
feed_or_html() X-Ref |
Sniff HTML return: string Actual Content-Type |
Class: SimplePie_Copyright - X-Ref
Manages `<media:copyright>` copyright tags as defined in Media RSS__construct($url = null, $label = null) X-Ref |
Constructor, used to input the data For documentation on all the parameters, see the corresponding properties and their accessors |
__toString() X-Ref |
String-ified version return: string |
get_url() X-Ref |
Get the copyright URL return: string|null URL to copyright information |
get_attribution() X-Ref |
Get the attribution text return: string|null |
Class: SimplePie_Credit - X-Ref
Handles `<media:credit>` as defined in Media RSS__construct($role = null, $scheme = null, $name = null) X-Ref |
Constructor, used to input the data For documentation on all the parameters, see the corresponding properties and their accessors |
__toString() X-Ref |
String-ified version return: string |
get_role() X-Ref |
Get the role of the person receiving credit return: string|null |
get_scheme() X-Ref |
Get the organizational scheme return: string|null |
get_name() X-Ref |
Get the credited person/entity's name return: string|null |
Class: SimplePie_Decode_HTML_Entities - X-Ref
Decode HTML Entities__construct($data) X-Ref |
Create an instance of the class with the input data param: string $data Input data |
parse() X-Ref |
Parse the input data return: string Output data |
consume() X-Ref |
Consume the next byte return: mixed The next byte, or false, if there is no more data |
consume_range($chars) X-Ref |
Consume a range of characters param: string $chars Characters to consume return: mixed A series of characters that match the range, or false |
unconsume() X-Ref |
Unconsume one byte |
entity() X-Ref |
Decode an entity |
Class: SimplePie_Enclosure - X-Ref
Handles everything related to enclosures (including Media RSS and iTunes RSS)__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) X-Ref |
Constructor, used to input the data For documentation on all the parameters, see the corresponding properties and their accessors |
__toString() X-Ref |
String-ified version return: string |
get_bitrate() X-Ref |
Get the bitrate return: string|null |
get_caption($key = 0) X-Ref |
Get a single caption param: int $key return: SimplePie_Caption|null |
get_captions() X-Ref |
Get all captions return: array|null Array of {@see SimplePie_Caption} objects |
get_category($key = 0) X-Ref |
Get a single category param: int $key return: SimplePie_Category|null |
get_categories() X-Ref |
Get all categories return: array|null Array of {@see SimplePie_Category} objects |
get_channels() X-Ref |
Get the number of audio channels return: int|null |
get_copyright() X-Ref |
Get the copyright information return: SimplePie_Copyright|null |
get_credit($key = 0) X-Ref |
Get a single credit param: int $key return: SimplePie_Credit|null |
get_credits() X-Ref |
Get all credits return: array|null Array of {@see SimplePie_Credit} objects |
get_description() X-Ref |
Get the description of the enclosure return: string|null |
get_duration($convert = false) X-Ref |
Get the duration of the enclosure param: string $convert Convert seconds into hh:mm:ss return: string|int|null 'hh:mm:ss' string if `$convert` was specified, otherwise integer (or null if none found) |
get_expression() X-Ref |
Get the expression return: string Probably one of 'sample', 'full', 'nonstop', 'clip'. Defaults to 'full' |
get_extension() X-Ref |
Get the file extension return: string|null |
get_framerate() X-Ref |
Get the framerate (in frames-per-second) return: string|null |
get_handler() X-Ref |
Get the preferred handler return: string|null One of 'flash', 'fmedia', 'quicktime', 'wmedia', 'mp3' |
get_hash($key = 0) X-Ref |
Get a single hash link: http://www.rssboard.org/media-rss#media-hash param: int $key return: string|null Hash as per `media:hash`, prefixed with "$algo:" |
get_hashes() X-Ref |
Get all credits return: array|null Array of strings, see {@see get_hash()} |
get_height() X-Ref |
Get the height return: string|null |
get_language() X-Ref |
Get the language link: http://tools.ietf.org/html/rfc3066 return: string|null Language code as per RFC 3066 |
get_keyword($key = 0) X-Ref |
Get a single keyword param: int $key return: string|null |
get_keywords() X-Ref |
Get all keywords return: array|null Array of strings |
get_length() X-Ref |
Get length return: float Length in bytes |
get_link() X-Ref |
Get the URL return: string|null |
get_medium() X-Ref |
Get the medium link: http://www.rssboard.org/media-rss#media-content return: string|null Should be one of 'image', 'audio', 'video', 'document', 'executable' |
get_player() X-Ref |
Get the player URL Typically the same as {@see get_permalink()} return: string|null Player URL |
get_rating($key = 0) X-Ref |
Get a single rating param: int $key return: SimplePie_Rating|null |
get_ratings() X-Ref |
Get all ratings return: array|null Array of {@see SimplePie_Rating} objects |
get_restriction($key = 0) X-Ref |
Get a single restriction param: int $key return: SimplePie_Restriction|null |
get_restrictions() X-Ref |
Get all restrictions return: array|null Array of {@see SimplePie_Restriction} objects |
get_sampling_rate() X-Ref |
Get the sampling rate (in kHz) return: string|null |
get_size() X-Ref |
Get the file size (in MiB) return: float|null File size in mebibytes (1048 bytes) |
get_thumbnail($key = 0) X-Ref |
Get a single thumbnail param: int $key return: string|null Thumbnail URL |
get_thumbnails() X-Ref |
Get all thumbnails return: array|null Array of thumbnail URLs |
get_title() X-Ref |
Get the title return: string|null |
get_type() X-Ref |
Get mimetype of the enclosure return: string|null MIME type see: get_real_type() |
get_width() X-Ref |
Get the width return: string|null |
native_embed($options='') X-Ref |
Embed the enclosure using `<embed>` param: array|string $options See first paramter to {@see embed} return: string HTML string to output |
embed($options = '', $native = false) X-Ref |
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 its 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. param: array|string $options Comma-separated key:value list, or array param: bool $native Use `<embed>` return: string HTML string to output |
get_real_type($find_handler = false) X-Ref |
Get the real media type Often, feeds lie to us, necessitating a bit of deeper inspection. This converts types to their canonical representations based on the file extension param: bool $find_handler Internal use only, use {@see get_handler()} instead return: string MIME type see: get_type() |
Class: SimplePie_File - X-Ref
Used for fetching remote files and reading local files__construct($url, $timeout = 10, $redirects = 5, $headers = null, $useragent = null, $force_fsockopen = false) X-Ref |
No description |
Class: SimplePie_HTTP_Parser - X-Ref
HTTP Response Parser__construct($data) X-Ref |
Create an instance of the class with the input data param: string $data Input data |
parse() X-Ref |
Parse the input data return: bool true on success, false on failure |
has_data() X-Ref |
Check whether there is data beyond the pointer return: bool true if there is further data, false if not |
is_linear_whitespace() X-Ref |
See if the next character is LWS return: bool true if the next character is LWS, false if not |
http_version() X-Ref |
Parse the HTTP version |
status() X-Ref |
Parse the status code |
reason() X-Ref |
Parse the reason phrase |
new_line() X-Ref |
Deal with a new line, shifting data around as needed |
name() X-Ref |
Parse a header name |
linear_whitespace() X-Ref |
Parse LWS, replacing consecutive LWS characters with a single space |
value() X-Ref |
See what state to move to while within non-quoted header values |
value_char() X-Ref |
Parse a header value while outside quotes |
quote() X-Ref |
See what state to move to while within quoted header values |
quote_char() X-Ref |
Parse a header value while within quotes |
quote_escaped() X-Ref |
Parse an escaped character within quotes |
body() X-Ref |
Parse the body |
chunked() X-Ref |
Parsed a "Transfer-Encoding: chunked" body |
Class: SimplePie_IRI - X-Ref
IRI parser/serialiser/normaliser__toString() X-Ref |
Return the entire IRI when you try and read the object as a string return: string |
__set($name, $value) X-Ref |
Overload __set() to provide access via properties param: string $name Property name param: mixed $value Property value |
__get($name) X-Ref |
Overload __get() to provide access via properties param: string $name Property name return: mixed |
__isset($name) X-Ref |
Overload __isset() to provide access via properties param: string $name Property name return: bool |
__unset($name) X-Ref |
Overload __unset() to provide access via properties param: string $name Property name |
__construct($iri = null) X-Ref |
Create a new IRI object, from a specified string param: string $iri |
absolutize($base, $relative) X-Ref |
Create a new IRI object by resolving a relative IRI Returns false if $base is not absolute, otherwise an IRI. param: IRI|string $base (Absolute) Base IRI param: IRI|string $relative Relative IRI return: IRI|false |
parse_iri($iri) X-Ref |
Parse an IRI into scheme/authority/path/query/fragment segments param: string $iri return: array |
remove_dot_segments($input) X-Ref |
Remove dot segments from a path param: string $input return: string |
replace_invalid_with_pct_encoding($string, $extra_chars, $iprivate = false) X-Ref |
Replace invalid character with percent encoding param: string $string Input string param: string $extra_chars Valid characters not in iunreserved or param: bool $iprivate Allow iprivate return: string |
remove_iunreserved_percent_encoded($match) X-Ref |
Callback function for preg_replace_callback. Removes sequences of percent encoded bytes that represent UTF-8 encoded characters in iunreserved param: array $match PCRE match return: string Replacement |
scheme_normalization() X-Ref |
No description |
is_valid() X-Ref |
Check if the object represents a valid IRI. This needs to be done on each call as some things change depending on another part of the IRI. return: bool |
set_iri($iri) X-Ref |
Set the entire IRI. Returns true on success, false on failure (if there are any invalid characters). param: string $iri return: bool |
set_scheme($scheme) X-Ref |
Set the scheme. Returns true on success, false on failure (if there are any invalid characters). param: string $scheme return: bool |
set_authority($authority) X-Ref |
Set the authority. Returns true on success, false on failure (if there are any invalid characters). param: string $authority return: bool |
set_userinfo($iuserinfo) X-Ref |
Set the iuserinfo. param: string $iuserinfo return: bool |
set_host($ihost) X-Ref |
Set the ihost. Returns true on success, false on failure (if there are any invalid characters). param: string $ihost return: bool |
set_port($port) X-Ref |
Set the port. Returns true on success, false on failure (if there are any invalid characters). param: string $port return: bool |
set_path($ipath) X-Ref |
Set the ipath. param: string $ipath return: bool |
set_query($iquery) X-Ref |
Set the iquery. param: string $iquery return: bool |
set_fragment($ifragment) X-Ref |
Set the ifragment. param: string $ifragment return: bool |
to_uri($string) X-Ref |
Convert an IRI to a URI (or parts thereof) return: string |
get_iri() X-Ref |
Get the complete IRI return: string |
get_uri() X-Ref |
Get the complete URI return: string |
get_iauthority() X-Ref |
Get the complete iauthority return: string |
get_authority() X-Ref |
Get the complete authority return: string |
Class: SimplePie_Item - X-Ref
Manages all item-related data__construct($feed, $data) X-Ref |
Create a new item object This is usually used by {@see SimplePie::get_items} and {@see SimplePie::get_item}. Avoid creating this manually. param: SimplePie $feed Parent feed param: array $data Raw data |
set_registry(SimplePie_Registry $registry) X-Ref |
Set the registry handler This is usually used by {@see SimplePie_Registry::create} param: SimplePie_Registry $registry |
__toString() X-Ref |
Get a string representation of the item return: string |
__destruct() X-Ref |
Remove items that link back to this before destroying this object |
get_item_tags($namespace, $tag) X-Ref |
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 {@see SimplePie::get_feed_tags()} for a description of the return value param: string $namespace The URL of the XML namespace of the elements you're trying to access param: string $tag Tag name return: array see: http://simplepie.org/wiki/faq/supported_xml_namespaces |
get_base($element = array() X-Ref |
Get the base URL value from the parent feed Uses `<xml:base>` param: array $element return: string |
sanitize($data, $type, $base = '') X-Ref |
Sanitize feed data param: string $data Data to sanitize param: int $type One of the SIMPLEPIE_CONSTRUCT_* constants param: string $base Base URL to resolve URLs against return: string Sanitized data see: SimplePie::sanitize() |
get_feed() X-Ref |
Get the parent feed Note: this may not work as you think for multifeeds! link: http://simplepie.org/faq/typical_multifeed_gotchas#missing_data_from_feed return: SimplePie |
get_id($hash = false) X-Ref |
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. param: boolean $hash Should we force using a hash instead of the supplied ID? return: string |
get_title() X-Ref |
Get the title of the item Uses `<atom:title>`, `<title>` or `<dc:title>` return: string|null |
get_description($description_only = false) X-Ref |
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 {@see get_content} Uses `<atom:summary>`, `<description>`, `<dc:description>` or `<itunes:subtitle>` param: boolean $description_only Should we avoid falling back to the content? return: string|null |
get_content($content_only = false) X-Ref |
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 {@see get_description} Uses `<atom:content>` or `<content:encoded>` (RSS 1.0 Content Module) param: boolean $content_only Should we avoid falling back to the description? return: string|null |
get_category($key = 0) X-Ref |
Get a category for the item param: int $key The category that you want to return. Remember that arrays begin with 0, not 1 return: SimplePie_Category|null |
get_categories() X-Ref |
Get all categories for the item Uses `<atom:category>`, `<category>` or `<dc:subject>` return: array|null List of {@see SimplePie_Category} objects |
get_author($key = 0) X-Ref |
Get an author for the item param: int $key The author that you want to return. Remember that arrays begin with 0, not 1 return: SimplePie_Author|null |
get_contributor($key = 0) X-Ref |
Get a contributor for the item param: int $key The contrbutor that you want to return. Remember that arrays begin with 0, not 1 return: SimplePie_Author|null |
get_contributors() X-Ref |
Get all contributors for the item Uses `<atom:contributor>` return: array|null List of {@see SimplePie_Author} objects |
get_authors() X-Ref |
Get all authors for the item Uses `<atom:author>`, `<author>`, `<dc:creator>` or `<itunes:author>` return: array|null List of {@see SimplePie_Author} objects |
get_copyright() X-Ref |
Get the copyright info for the item Uses `<atom:rights>` or `<dc:rights>` return: string |
get_date($date_format = 'j F Y, g:i a') X-Ref |
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 {@see get_gmdate} param: string $date_format Supports any PHP date format from {@see http://php.net/date} (empty for the raw data) return: int|string|null |
get_updated_date($date_format = 'j F Y, g:i a') X-Ref |
Get the update date/time for the item Uses `<atom:updated>` Note: obeys PHP's timezone setting. To get a UTC date/time, use {@see get_gmdate} param: string $date_format Supports any PHP date format from {@see http://php.net/date} (empty for the raw data) return: int|string|null |
get_local_date($date_format = '%c') X-Ref |
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 {@link http://php.net/setlocale setlocale()}. The available localizations depend on which ones are installed on your web server. param: string $date_format Supports any PHP date format from {@see http://php.net/strftime} (empty for the raw data) return: int|string|null |
get_gmdate($date_format = 'j F Y, g:i a') X-Ref |
Get the posting date/time for the item (UTC time) param: string $date_format Supports any PHP date format from {@see http://php.net/date} return: int|string|null see: get_date |
get_updated_gmdate($date_format = 'j F Y, g:i a') X-Ref |
Get the update date/time for the item (UTC time) param: string $date_format Supports any PHP date format from {@see http://php.net/date} return: int|string|null see: get_updated_date |
get_permalink() X-Ref |
Get the permalink for the item Returns the first link available with a relationship of "alternate". Identical to {@see get_link()} with key 0 return: string|null Permalink URL see: get_link |
get_link($key = 0, $rel = 'alternate') X-Ref |
Get a single link for the item param: int $key The link that you want to return. Remember that arrays begin with 0, not 1 param: string $rel The relationship of the link to return return: string|null Link URL |
get_links($rel = 'alternate') X-Ref |
Get all links for the item Uses `<atom:link>`, `<link>` or `<guid>` param: string $rel The relationship of links to return return: array|null Links found for the item (strings) |
get_enclosure($key = 0, $prefer = null) X-Ref |
Get an enclosure from the item Supports the <enclosure> RSS tag, as well as Media RSS and iTunes RSS. param: int $key The enclosure that you want to return. Remember that arrays begin with 0, not 1 return: SimplePie_Enclosure|null |
get_enclosures() X-Ref |
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. return: array|null List of SimplePie_Enclosure items |
get_latitude() X-Ref |
Get the latitude coordinates for the item Compatible with the W3C WGS84 Basic Geo and GeoRSS specifications Uses `<geo:lat>` or `<georss:point>` link: http://www.w3.org/2003/01/geo/ W3C WGS84 Basic Geo link: http://www.georss.org/ GeoRSS return: string|null |
get_longitude() X-Ref |
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>` link: http://www.w3.org/2003/01/geo/ W3C WGS84 Basic Geo link: http://www.georss.org/ GeoRSS return: string|null |
get_source() X-Ref |
Get the `<atom:source>` for the item return: SimplePie_Source|null |
Class: SimplePie_Locator - X-Ref
Used for feed auto-discovery__construct(SimplePie_File $file, $timeout = 10, $useragent = null, $max_checked_feeds = 10) X-Ref |
No description |
set_registry(SimplePie_Registry $registry) X-Ref |
No description |
find($type = SIMPLEPIE_LOCATOR_ALL, &$working) X-Ref |
No description |
is_feed($file) X-Ref |
No description |
get_base() X-Ref |
No description |
autodiscovery() X-Ref |
No description |
search_elements_by_tag($name, &$done, $feeds) X-Ref |
No description |
get_links() X-Ref |
No description |
extension(&$array) X-Ref |
No description |
body(&$array) X-Ref |
No description |
Class: SimplePie_Misc - X-Ref
Miscellanous utilitiestime_hms($seconds) X-Ref |
No description |
absolutize_url($relative, $base) X-Ref |
No description |
get_element($realname, $string) X-Ref |
Get a HTML/XML element from a HTML string param: string $realname Element name (including namespace prefix if applicable) param: string $string HTML document return: array |
element_implode($element) X-Ref |
No description |
error($message, $level, $file, $line) X-Ref |
No description |
fix_protocol($url, $http = 1) X-Ref |
No description |
parse_url($url) X-Ref |
No description |
compress_parse_url($scheme = '', $authority = '', $path = '', $query = '', $fragment = '') X-Ref |
No description |
normalize_url($url) X-Ref |
No description |
percent_encoding_normalization($match) X-Ref |
No description |
windows_1252_to_utf8($string) X-Ref |
Converts a Windows-1252 encoded string to a UTF-8 encoded string param: string $string Windows-1252 encoded string return: string UTF-8 encoded string |
change_encoding($data, $input, $output) X-Ref |
Change a string from one encoding to another param: string $data Raw data in $input encoding param: string $input Encoding of $data param: string $output Encoding you want return: string|boolean False if we can't convert it |
change_encoding_mbstring($data, $input, $output) X-Ref |
No description |
change_encoding_iconv($data, $input, $output) X-Ref |
No description |
encoding($charset) X-Ref |
Normalize an encoding name This is automatically generated by create.php To generate it, run `php create.php` on the command line, and copy the output to replace this function. param: string $charset Character set to standardise return: string Standardised name |
get_curl_version() X-Ref |
No description |
strip_comments($data) X-Ref |
Strip HTML comments param: string $data Data to strip comments from return: string Comment stripped string |
parse_date($dt) X-Ref |
No description |
entities_decode($data) X-Ref |
Decode HTML entities param: string $data Input data return: string Output data |
uncomment_rfc822($string) X-Ref |
Remove RFC822 comments param: string $data Data to strip comments from return: string Comment stripped string |
parse_mime($mime) X-Ref |
No description |
atom_03_construct_type($attribs) X-Ref |
No description |
atom_10_construct_type($attribs) X-Ref |
No description |
atom_10_content_construct_type($attribs) X-Ref |
No description |
is_isegment_nz_nc($string) X-Ref |
No description |
space_seperated_tokens($string) X-Ref |
No description |
codepoint_to_utf8($codepoint) X-Ref |
Converts a unicode codepoint to a UTF-8 character param: int $codepoint Unicode codepoint return: string UTF-8 character |
parse_str($str) X-Ref |
Similar to parse_str() Returns an associative array of name/value pairs, where the value is an array of values that have used the same name param: string $str The input string. return: array |
xml_encoding($data, $registry) X-Ref |
Detect XML encoding, as per XML 1.0 Appendix F.1 param: string $data XML data param: SimplePie_Registry $registry Class registry return: array Possible encodings |
output_javascript() X-Ref |
No description |
embed_quicktime(type, bgcolor, width, height, link, placeholder, loop) X-Ref |
No description |
embed_flash(bgcolor, width, height, link, loop, type) X-Ref |
No description |
embed_flv(width, height, link, placeholder, loop, player) X-Ref |
No description |
embed_wmedia(width, height, link) X-Ref |
No description |
get_build() X-Ref |
Get the SimplePie build timestamp Uses the git index if it exists, otherwise uses the modification time of the newest file. |
debug(&$sp) X-Ref |
Format debugging information |
silence_errors($num, $str) X-Ref |
No description |
Class: SimplePie_Net_IPv6 - X-Ref
Class to validate and to work with IPv6 addresses.uncompress($ip) X-Ref |
Uncompresses an IPv6 address RFC 4291 allows you to compress concecutive zero pieces in an address to '::'. This method expects a valid IPv6 address and expands the '::' to the required number of zero pieces. Example: FF01::101 -> FF01:0:0:0:0:0:0:101 ::1 -> 0:0:0:0:0:0:0:1 author: Alexander Merz <alexander.merz@web.de> author: elfrink at introweb dot nl author: Josh Peck <jmp at joshpeck dot org> param: string $ip An IPv6 address return: string The uncompressed IPv6 address |
compress($ip) X-Ref |
Compresses an IPv6 address RFC 4291 allows you to compress concecutive zero pieces in an address to '::'. This method expects a valid IPv6 address and compresses consecutive zero pieces to '::'. Example: FF01:0:0:0:0:0:0:101 -> FF01::101 0:0:0:0:0:0:0:1 -> ::1 param: string $ip An IPv6 address return: string The compressed IPv6 address see: uncompress() |
split_v6_v4($ip) X-Ref |
Splits an IPv6 address into the IPv6 and IPv4 representation parts RFC 4291 allows you to represent the last two parts of an IPv6 address using the standard IPv4 representation Example: 0:0:0:0:0:0:13.1.68.3 0:0:0:0:0:FFFF:129.144.52.38 param: string $ip An IPv6 address return: array [0] contains the IPv6 represented part, and [1] the IPv4 represented part |
check_ipv6($ip) X-Ref |
Checks an IPv6 address Checks if the given IP is a valid IPv6 address param: string $ip An IPv6 address return: bool true if $ip is a valid IPv6 address |
checkIPv6($ip) X-Ref |
Checks if the given IP is a valid IPv6 address param: string $ip An IPv6 address return: bool true if $ip is a valid IPv6 address see: check_ipv6 |
Class: SimplePie_Parse_Date - X-Ref
Date Parser__construct() X-Ref |
Create new SimplePie_Parse_Date object, and set self::day_pcre, self::month_pcre, and self::built_in |
get() X-Ref |
Get the object |
parse($date) X-Ref |
Parse a date param: string $date Date to parse return: int Timestamp corresponding to date string, or false on failure |
add_callback($callback) X-Ref |
Add a callback method to parse a date param: callback $callback |
date_w3cdtf($date) X-Ref |
Parse a superset of W3C-DTF (allows hyphens and colons to be omitted, as well as allowing any of upper or lower case "T", horizontal tabs, or spaces to be used as the time seperator (including more than one)) return: int Timestamp |
remove_rfc2822_comments($string) X-Ref |
Remove RFC822 comments param: string $data Data to strip comments from return: string Comment stripped string |
date_rfc2822($date) X-Ref |
Parse RFC2822's date format return: int Timestamp |
date_rfc850($date) X-Ref |
Parse RFC850's date format return: int Timestamp |
date_asctime($date) X-Ref |
Parse C99's asctime()'s date format return: int Timestamp |
date_strtotime($date) X-Ref |
Parse dates using strtotime() return: int Timestamp |
Class: SimplePie_Parser - X-Ref
Parses XML into something saneset_registry(SimplePie_Registry $registry) X-Ref |
No description |
parse(&$data, $encoding) X-Ref |
No description |
get_error_code() X-Ref |
No description |
get_error_string() X-Ref |
No description |
get_current_line() X-Ref |
No description |
get_current_column() X-Ref |
No description |
get_current_byte() X-Ref |
No description |
get_data() X-Ref |
No description |
tag_open($parser, $tag, $attributes) X-Ref |
No description |
cdata($parser, $cdata) X-Ref |
No description |
tag_close($parser, $tag) X-Ref |
No description |
split_ns($string) X-Ref |
No description |
Class: SimplePie_Rating - X-Ref
Handles `<media:rating>` or `<itunes:explicit>` tags as defined in Media RSS and iTunes RSS respectively__construct($scheme = null, $value = null) X-Ref |
Constructor, used to input the data For documentation on all the parameters, see the corresponding properties and their accessors |
__toString() X-Ref |
String-ified version return: string |
get_scheme() X-Ref |
Get the organizational scheme for the rating return: string|null |
get_value() X-Ref |
Get the value of the rating return: string|null |
Class: SimplePie_Registry - X-Ref
Handles creating objects and calling methods__construct() X-Ref |
Constructor No-op |
register($type, $class, $legacy = false) X-Ref |
Register a class param: string $type See {@see $default} for names param: string $class Class name, must subclass the corresponding default param: bool $legacy Whether to enable legacy support for this class return: bool Successfulness |
get_class($type) X-Ref |
Get the class registered for a type Where possible, use {@see create()} or {@see call()} instead param: string $type return: string|null |
create($type, $parameters = array() X-Ref |
Create a new instance of a given type param: string $type param: array $parameters Parameters to pass to the constructor return: object Instance of class |
call($type, $method, $parameters = array() X-Ref |
Call a static method for a type param: string $type param: string $method param: array $parameters return: mixed |
Class: SimplePie_Restriction - X-Ref
Handles `<media:restriction>` as defined in Media RSS__construct($relationship = null, $type = null, $value = null) X-Ref |
Constructor, used to input the data For documentation on all the parameters, see the corresponding properties and their accessors |
__toString() X-Ref |
String-ified version return: string |
get_relationship() X-Ref |
Get the relationship return: string|null Either 'allow' or 'deny' |
get_type() X-Ref |
Get the type return: string|null |
get_value() X-Ref |
Get the list of restricted things return: string|null |
Class: SimplePie_Sanitize - X-Ref
Used for data cleanup and post-processing__construct() X-Ref |
No description |
remove_div($enable = true) X-Ref |
No description |
set_image_handler($page = false) X-Ref |
No description |
set_registry(SimplePie_Registry $registry) X-Ref |
No description |
pass_cache_data($enable_cache = true, $cache_location = './cache', $cache_name_function = 'md5', $cache_class = 'SimplePie_Cache') X-Ref |
No description |
pass_file_data($file_class = 'SimplePie_File', $timeout = 10, $useragent = '', $force_fsockopen = false) X-Ref |
No description |
strip_htmltags($tags = array('base', 'blink', 'body', 'doctype', 'embed', 'font', 'form', 'frame', 'frameset', 'html', 'iframe', 'input', 'marquee', 'meta', 'noscript', 'object', 'param', 'script', 'style') X-Ref |
No description |
encode_instead_of_strip($encode = false) X-Ref |
No description |
strip_attributes($attribs = array('bgsound', 'class', 'expr', 'id', 'style', 'onclick', 'onerror', 'onfinish', 'onmouseover', 'onmouseout', 'onfocus', 'onblur', 'lowsrc', 'dynsrc') X-Ref |
No description |
strip_comments($strip = false) X-Ref |
No description |
set_output_encoding($encoding = 'UTF-8') X-Ref |
No description |
set_url_replacements($element_attribute = null) X-Ref |
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 param: array|null $element_attribute Element/attribute key/value pairs, null for default |
sanitize($data, $type, $base = '') X-Ref |
No description |
preprocess($html, $type) X-Ref |
No description |
replace_urls($document, $tag, $attributes) X-Ref |
No description |
do_strip_htmltags($match) X-Ref |
No description |
strip_tag($tag, $document, $type) X-Ref |
No description |
strip_attr($attrib, $document) X-Ref |
No description |
Class: SimplePie_Source - X-Ref
Handles `<atom:source>`__construct($item, $data) X-Ref |
No description |
set_registry(SimplePie_Registry $registry) X-Ref |
No description |
__toString() X-Ref |
No description |
get_source_tags($namespace, $tag) X-Ref |
No description |
get_base($element = array() X-Ref |
No description |
sanitize($data, $type, $base = '') X-Ref |
No description |
get_item() X-Ref |
No description |
get_title() X-Ref |
No description |
get_category($key = 0) X-Ref |
No description |
get_categories() X-Ref |
No description |
get_author($key = 0) X-Ref |
No description |
get_authors() X-Ref |
No description |
get_contributor($key = 0) X-Ref |
No description |
get_contributors() X-Ref |
No description |
get_link($key = 0, $rel = 'alternate') X-Ref |
No description |
get_permalink() X-Ref |
Added for parity between the parent-level and the item/entry-level. |
get_links($rel = 'alternate') X-Ref |
No description |
get_description() X-Ref |
No description |
get_copyright() X-Ref |
No description |
get_language() X-Ref |
No description |
get_latitude() X-Ref |
No description |
get_longitude() X-Ref |
No description |
get_image_url() X-Ref |
No description |
Class: SimplePie_XML_Declaration_Parser - X-Ref
Parses the XML Declaration__construct($data) X-Ref |
Create an instance of the class with the input data param: string $data Input data |
parse() X-Ref |
Parse the input data return: bool true on success, false on failure |
has_data() X-Ref |
Check whether there is data beyond the pointer return: bool true if there is further data, false if not |
skip_whitespace() X-Ref |
Advance past any whitespace return: int Number of whitespace characters passed |
get_value() X-Ref |
Read value |
before_version_name() X-Ref |
No description |
version_name() X-Ref |
No description |
version_equals() X-Ref |
No description |
version_value() X-Ref |
No description |
encoding_name() X-Ref |
No description |
encoding_equals() X-Ref |
No description |
encoding_value() X-Ref |
No description |
standalone_name() X-Ref |
No description |
standalone_equals() X-Ref |
No description |
standalone_value() X-Ref |
No description |