Joomla CMS
3.10.11 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.10.11 et du framework Joomla Platform intégré
|
Fonctions membres publiques statiques | |
static | sort_items ($a, $b) |
static | merge_items ($urls, $start=0, $end=0, $limit=0) |
Champs de données | |
$data = array() | |
$error | |
$sanitize | |
$useragent = SIMPLEPIE_USERAGENT | |
$feed_url | |
$file | |
$raw_data | |
$timeout = 10 | |
$force_fsockopen = false | |
$force_feed = false | |
$cache = true | |
$cache_duration = 3600 | |
$autodiscovery_cache_duration = 604800 | |
$cache_location = './cache' | |
$cache_name_function = 'md5' | |
$order_by_date = true | |
$input_encoding = false | |
$autodiscovery = SIMPLEPIE_LOCATOR_ALL | |
$registry | |
$max_checked_feeds = 10 | |
$all_discovered_feeds = array() | |
$image_handler = '' | |
$multifeed_url = array() | |
$multifeed_objects = array() | |
$config_settings = null | |
$item_limit = 0 | |
$strip_attributes = array('bgsound', 'class', 'expr', 'id', 'style', 'onclick', 'onerror', 'onfinish', 'onmouseover', 'onmouseout', 'onfocus', 'onblur', 'lowsrc', 'dynsrc') | |
$strip_htmltags = array('base', 'blink', 'body', 'doctype', 'embed', 'font', 'form', 'frame', 'frameset', 'html', 'iframe', 'input', 'marquee', 'meta', 'noscript', 'object', 'param', 'script', 'style') | |
Fonctions membres protégées | |
fetch_data (&$cache) | |
__construct | ( | ) |
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.
Références init(), sanitize(), set_cache_duration(), set_cache_location(), et set_feed_url().
__destruct | ( | ) |
Remove items that link back to this before destroying this object
Références $item.
__call | ( | $method, | |
$args | |||
) |
__toString | ( | ) |
Used for converting object to a string
enable_cache | ( | $enable = true | ) |
enable_order_by_date | ( | $enable = true | ) |
Set whether feed items should be sorted into reverse chronological order
bool | $enable | Sort as reverse chronological order. |
Référencé par set_stupidly_fast().
encode_instead_of_strip | ( | $enable = true | ) |
Références sanitize().
error | ( | ) |
Get the error message for the occured error
Références $error.
Référencé par fetch_data(), et init().
|
protected |
Fetch the data via SimplePie_File
If the data is already cached, attempt to fetch it from there instead
SimplePie_Cache | false | $cache | Cache handler, or false to not load from the cache |
Références $cache, $file, elseif, error(), force_feed(), force_fsockopen(), init(), null, set_feed_url(), SIMPLEPIE_BUILD, SIMPLEPIE_FILE_SOURCE_REMOTE, et SIMPLEPIE_NAME.
Référencé par init().
force_feed | ( | $enable = false | ) |
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.
bool | $enable | Force the given data/URL to be treated as a feed |
Référencé par fetch_data().
force_fsockopen | ( | $enable = false | ) |
Force SimplePie to use fsockopen() instead of cURL
bool | $enable | Force fsockopen() to be used |
Référencé par fetch_data().
get_all_discovered_feeds | ( | ) |
Références $all_discovered_feeds.
get_author | ( | $key = 0 | ) |
Get an author for the feed
int | $key | The author that you want to return. Remember that arrays begin with 0, not 1 |
Références $key, get_authors(), et null.
get_authors | ( | ) |
Get all authors for the feed
Uses <atom:author>
, <author>
, <dc:creator>
or <itunes:author>
Références $author, $name, $uri, $url, get_base(), get_channel_tags(), null, sanitize(), SIMPLEPIE_CONSTRUCT_IRI, SIMPLEPIE_CONSTRUCT_TEXT, SIMPLEPIE_NAMESPACE_ATOM_03, SIMPLEPIE_NAMESPACE_ATOM_10, SIMPLEPIE_NAMESPACE_DC_10, SIMPLEPIE_NAMESPACE_DC_11, et SIMPLEPIE_NAMESPACE_ITUNES.
Référencé par get_author().
get_base | ( | $element = array() | ) |
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.
array | $element |
Références elseif, get_link(), get_type(), null, SIMPLEPIE_TYPE_RSS_SYNDICATION, et subscribe_url().
Référencé par get_authors(), get_contributors(), get_copyright(), get_description(), get_image_link(), get_image_url(), get_links(), et get_title().
get_categories | ( | ) |
Get all categories for the feed
Uses <atom:category>
, <category>
or <dc:subject>
Références $category, $label, get_channel_tags(), null, sanitize(), SIMPLEPIE_CONSTRUCT_TEXT, SIMPLEPIE_NAMESPACE_ATOM_10, SIMPLEPIE_NAMESPACE_DC_10, SIMPLEPIE_NAMESPACE_DC_11, et SIMPLEPIE_NAMESPACE_RSS_20.
Référencé par get_category().
get_category | ( | $key = 0 | ) |
Get a category for the feed
int | $key | The category that you want to return. Remember that arrays begin with 0, not 1 |
Références $key, get_categories(), et null.
get_channel_tags | ( | $namespace, | |
$tag | |||
) |
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 {
string | $namespace | The URL of the XML namespace of the elements you're trying to access |
string | $tag | Tag name |
Références $return, $type, get_feed_tags(), get_type(), null, SIMPLEPIE_NAMESPACE_RSS_090, SIMPLEPIE_NAMESPACE_RSS_10, SIMPLEPIE_NAMESPACE_RSS_20, SIMPLEPIE_TYPE_ATOM_ALL, SIMPLEPIE_TYPE_RSS_090, SIMPLEPIE_TYPE_RSS_10, et SIMPLEPIE_TYPE_RSS_SYNDICATION.
Référencé par get_authors(), get_categories(), get_contributors(), get_copyright(), get_description(), get_image_tags(), get_image_url(), get_items(), get_language(), get_latitude(), get_links(), get_longitude(), et get_title().
get_contributor | ( | $key = 0 | ) |
Get a contributor for the feed
int | $key | The contrbutor that you want to return. Remember that arrays begin with 0, not 1 |
Références $key, get_contributors(), et null.
get_contributors | ( | ) |
Get all contributors for the feed
Uses <atom:contributor>
Références $name, $uri, $url, get_base(), get_channel_tags(), null, sanitize(), SIMPLEPIE_CONSTRUCT_IRI, SIMPLEPIE_CONSTRUCT_TEXT, SIMPLEPIE_NAMESPACE_ATOM_03, et SIMPLEPIE_NAMESPACE_ATOM_10.
Référencé par get_contributor().
get_copyright | ( | ) |
Get the copyright info for the feed
Uses <atom:rights>
, <atom:copyright>
or <dc:rights>
get_feed_copyright()
since 0.8) Références $return, elseif, get_base(), get_channel_tags(), null, sanitize(), SIMPLEPIE_CONSTRUCT_TEXT, SIMPLEPIE_NAMESPACE_ATOM_03, SIMPLEPIE_NAMESPACE_ATOM_10, SIMPLEPIE_NAMESPACE_DC_10, SIMPLEPIE_NAMESPACE_DC_11, et SIMPLEPIE_NAMESPACE_RSS_20.
get_description | ( | ) |
Get the content for the item
Uses <atom:subtitle>
, <atom:tagline>
, <description>
, <dc:description>
, <itunes:summary>
or <itunes:subtitle>
get_feed_description()
since 0.8) Références $return, elseif, get_base(), get_channel_tags(), null, sanitize(), SIMPLEPIE_CONSTRUCT_HTML, SIMPLEPIE_CONSTRUCT_MAYBE_HTML, SIMPLEPIE_CONSTRUCT_TEXT, SIMPLEPIE_NAMESPACE_ATOM_03, SIMPLEPIE_NAMESPACE_ATOM_10, SIMPLEPIE_NAMESPACE_DC_10, SIMPLEPIE_NAMESPACE_DC_11, SIMPLEPIE_NAMESPACE_ITUNES, SIMPLEPIE_NAMESPACE_RSS_090, SIMPLEPIE_NAMESPACE_RSS_10, et SIMPLEPIE_NAMESPACE_RSS_20.
get_encoding | ( | ) |
Get the character encoding used for output
Références sanitize().
Référencé par handle_content_type().
get_favicon | ( | ) |
Get the favicon for the current feed
Références $url, get_link(), et null.
get_feed_tags | ( | $namespace, | |
$tag | |||
) |
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;
string | $namespace | The URL of the XML namespace of the elements you're trying to access |
string | $tag | Tag name |
Références $type, get_type(), null, SIMPLEPIE_NAMESPACE_ATOM_03, SIMPLEPIE_NAMESPACE_ATOM_10, SIMPLEPIE_NAMESPACE_RDF, SIMPLEPIE_NAMESPACE_RSS_20, SIMPLEPIE_TYPE_ATOM_03, SIMPLEPIE_TYPE_ATOM_10, SIMPLEPIE_TYPE_RSS_RDF, et SIMPLEPIE_TYPE_RSS_SYNDICATION.
Référencé par get_channel_tags(), get_image_tags(), et get_items().
get_image_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.
Références $return, elseif, get_image_tags(), get_type(), null, SIMPLEPIE_NAMESPACE_RSS_20, et SIMPLEPIE_TYPE_RSS_SYNDICATION.
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>
Références $return, elseif, get_base(), get_image_tags(), null, sanitize(), SIMPLEPIE_CONSTRUCT_IRI, SIMPLEPIE_NAMESPACE_RSS_090, SIMPLEPIE_NAMESPACE_RSS_10, et SIMPLEPIE_NAMESPACE_RSS_20.
get_image_tags | ( | $namespace, | |
$tag | |||
) |
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 {
string | $namespace | The URL of the XML namespace of the elements you're trying to access |
string | $tag | Tag name |
Références $image, $type, get_channel_tags(), get_feed_tags(), get_type(), null, SIMPLEPIE_NAMESPACE_RSS_090, SIMPLEPIE_NAMESPACE_RSS_10, SIMPLEPIE_NAMESPACE_RSS_20, SIMPLEPIE_TYPE_RSS_090, SIMPLEPIE_TYPE_RSS_10, et SIMPLEPIE_TYPE_RSS_SYNDICATION.
Référencé par get_image_height(), get_image_link(), get_image_title(), get_image_url(), et get_image_width().
get_image_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>
Références $return, elseif, get_image_tags(), null, sanitize(), SIMPLEPIE_CONSTRUCT_TEXT, SIMPLEPIE_NAMESPACE_DC_10, SIMPLEPIE_NAMESPACE_DC_11, SIMPLEPIE_NAMESPACE_RSS_090, SIMPLEPIE_NAMESPACE_RSS_10, et SIMPLEPIE_NAMESPACE_RSS_20.
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>
Références $return, elseif, get_base(), get_channel_tags(), get_image_tags(), null, sanitize(), SIMPLEPIE_CONSTRUCT_IRI, SIMPLEPIE_NAMESPACE_ATOM_10, SIMPLEPIE_NAMESPACE_ITUNES, SIMPLEPIE_NAMESPACE_RSS_090, SIMPLEPIE_NAMESPACE_RSS_10, et SIMPLEPIE_NAMESPACE_RSS_20.
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.
Références $return, elseif, get_image_tags(), get_type(), null, SIMPLEPIE_NAMESPACE_RSS_20, et SIMPLEPIE_TYPE_RSS_SYNDICATION.
get_item | ( | $key = 0 | ) |
Get a single item from the feed
This is better suited for for() loops, whereas {
int | $key | The item that you want to return. Remember that arrays begin with 0, not 1 |
Références $items, $key, get_items(), et null.
get_item_quantity | ( | $max = 0 | ) |
Get the number of items in the feed
This is well-suited for for() loops with {
int | $max | Maximum value to return. 0 for no limit |
Références get_items().
get_items | ( | $start = 0 , |
|
$end = 0 |
|||
) |
Get all items from the feed
This is better suited for for() loops, whereas {
int | $start | Index to start at |
int | $end | Number of items to return. 0 for all items after $start |
Références $item, $items, $key, $start, get_channel_tags(), get_feed_tags(), merge_items(), null, SIMPLEPIE_NAMESPACE_ATOM_03, SIMPLEPIE_NAMESPACE_ATOM_10, SIMPLEPIE_NAMESPACE_RSS_090, SIMPLEPIE_NAMESPACE_RSS_10, et SIMPLEPIE_NAMESPACE_RSS_20.
Référencé par get_item(), et get_item_quantity().
get_language | ( | ) |
Get the language for the feed
Uses <language>
, <dc:language>
, or
get_feed_language()
since 0.8) Références $return, elseif, get_channel_tags(), null, sanitize(), SIMPLEPIE_CONSTRUCT_TEXT, SIMPLEPIE_NAMESPACE_ATOM_03, SIMPLEPIE_NAMESPACE_ATOM_10, SIMPLEPIE_NAMESPACE_DC_10, SIMPLEPIE_NAMESPACE_DC_11, SIMPLEPIE_NAMESPACE_RDF, et SIMPLEPIE_NAMESPACE_RSS_20.
get_latitude | ( | ) |
Get the latitude coordinates for the item
Compatible with the W3C WGS84 Basic Geo and GeoRSS specifications
Uses <geo:lat>
or <georss:point>
Références $return, elseif, get_channel_tags(), null, SIMPLEPIE_NAMESPACE_GEORSS, et SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO.
get_link | ( | $key = 0 , |
|
$rel = 'alternate' |
|||
) |
Get a single link for the feed
get_feed_link
since Preview Release, get_feed_permalink()
since 0.8) int | $key | The link that you want to return. Remember that arrays begin with 0, not 1 |
string | $rel | The relationship of the link to return |
Références $key, $rel, get_links(), et null.
Référencé par get_base(), get_favicon(), et get_permalink().
get_links | ( | $rel = 'alternate' | ) |
Get all links for the feed
Uses <atom:link>
or <link>
string | $rel | The relationship of links to return |
Références $key, $link, $rel, elseif, get_base(), get_channel_tags(), null, sanitize(), SIMPLEPIE_CONSTRUCT_IRI, SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY, SIMPLEPIE_NAMESPACE_ATOM_03, SIMPLEPIE_NAMESPACE_ATOM_10, SIMPLEPIE_NAMESPACE_RSS_090, SIMPLEPIE_NAMESPACE_RSS_10, et SIMPLEPIE_NAMESPACE_RSS_20.
Référencé par get_link().
get_longitude | ( | ) |
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>
Références $return, elseif, get_channel_tags(), null, SIMPLEPIE_NAMESPACE_GEORSS, et SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO.
get_permalink | ( | ) |
Get the permalink for the item
Returns the first link available with a relationship of "alternate". Identical to {
get_feed_link
since Preview Release, get_feed_permalink()
since 0.8) Références get_link().
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.
Références $raw_data.
& get_registry | ( | ) |
Get the class registry
Use this to override SimplePie's default classes
Références $registry.
get_title | ( | ) |
Get the title of the feed
Uses <atom:title>
, <title>
or <dc:title>
get_feed_title
since 0.8) Références $return, elseif, get_base(), get_channel_tags(), null, sanitize(), SIMPLEPIE_CONSTRUCT_MAYBE_HTML, SIMPLEPIE_CONSTRUCT_TEXT, SIMPLEPIE_NAMESPACE_ATOM_03, SIMPLEPIE_NAMESPACE_ATOM_10, SIMPLEPIE_NAMESPACE_DC_10, SIMPLEPIE_NAMESPACE_DC_11, SIMPLEPIE_NAMESPACE_RSS_090, SIMPLEPIE_NAMESPACE_RSS_10, et SIMPLEPIE_NAMESPACE_RSS_20.
get_type | ( | ) |
Get the type of the feed
This returns a SIMPLEPIE_TYPE_* constant, which can be tested against using bitwise operators
Références elseif, SIMPLEPIE_NAMESPACE_ATOM_03, SIMPLEPIE_NAMESPACE_ATOM_10, SIMPLEPIE_NAMESPACE_RDF, SIMPLEPIE_NAMESPACE_RSS_090, SIMPLEPIE_NAMESPACE_RSS_10, SIMPLEPIE_NAMESPACE_RSS_20, SIMPLEPIE_TYPE_ALL, SIMPLEPIE_TYPE_ATOM_03, SIMPLEPIE_TYPE_ATOM_10, SIMPLEPIE_TYPE_NONE, SIMPLEPIE_TYPE_RSS_090, SIMPLEPIE_TYPE_RSS_091, SIMPLEPIE_TYPE_RSS_091_NETSCAPE, SIMPLEPIE_TYPE_RSS_091_USERLAND, SIMPLEPIE_TYPE_RSS_092, SIMPLEPIE_TYPE_RSS_093, SIMPLEPIE_TYPE_RSS_094, SIMPLEPIE_TYPE_RSS_10, SIMPLEPIE_TYPE_RSS_20, et SIMPLEPIE_TYPE_RSS_ALL.
Référencé par get_base(), get_channel_tags(), get_feed_tags(), get_image_height(), get_image_tags(), get_image_width(), et init().
handle_content_type | ( | $mime = 'text/html' | ) |
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 {
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).
string | $mime | MIME type to serve the page as |
Références get_encoding().
init | ( | ) |
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.
Références $cache, $force_fsockopen, $i, $input_encoding, $timeout, $url, $useragent, elseif, error(), fetch_data(), get_type(), null, sanitize(), SIMPLEPIE_BUILD, et SIMPLEPIE_TYPE_NONE.
Référencé par __construct(), et fetch_data().
|
static |
remove_div | ( | $enable = true | ) |
Références sanitize().
Référencé par set_stupidly_fast().
sanitize | ( | $data, | |
$type, | |||
$base = '' |
|||
) |
Sanitize feed data
private
string | $data | Data to sanitize |
int | $type | One of the SIMPLEPIE_CONSTRUCT_* constants |
string | $base | Base URL to resolve URLs against |
Références $base, $data, et $type.
Référencé par __construct(), encode_instead_of_strip(), get_authors(), get_categories(), get_contributors(), get_copyright(), get_description(), get_encoding(), get_image_link(), get_image_title(), get_image_url(), get_language(), get_links(), get_title(), init(), remove_div(), set_image_handler(), set_output_encoding(), set_url_replacements(), strip_attributes(), strip_comments(), strip_htmltags(), et subscribe_url().
set_author_class | ( | $class = 'SimplePie_Author' | ) |
set_autodiscovery_cache_duration | ( | $seconds = 604800 | ) |
Set the length of time (in seconds) that the autodiscovered feed URL will be cached
int | $seconds | The autodiscovered feed URL cache duration. |
set_autodiscovery_level | ( | $level = SIMPLEPIE_LOCATOR_ALL | ) |
Set how much feed autodiscovery to do
int | $level | Feed Autodiscovery Level (level can be a combination of the above constants, see bitwise OR operator) |
set_cache_class | ( | $class = 'SimplePie_Cache' | ) |
#+ Useful when you are overloading or extending SimplePie's default classes.
Références $class.
set_cache_duration | ( | $seconds = 3600 | ) |
Set the length of time (in seconds) that the contents of a feed will be cached
int | $seconds | The feed content cache duration |
Référencé par __construct().
set_cache_location | ( | $location = './cache' | ) |
Set the file system location where the cached files should be stored
string | $location | The file system location. |
Références $location.
Référencé par __construct().
set_cache_name_function | ( | $function = 'md5' | ) |
Set callback function to create cache filename with
mixed | $function | Callback function |
Références $function.
set_caption_class | ( | $class = 'SimplePie_Caption' | ) |
set_category_class | ( | $class = 'SimplePie_Category' | ) |
set_content_type_sniffer_class | ( | $class = 'SimplePie_Content_Type_Sniffer' | ) |
set_copyright_class | ( | $class = 'SimplePie_Copyright' | ) |
set_credit_class | ( | $class = 'SimplePie_Credit' | ) |
set_enclosure_class | ( | $class = 'SimplePie_Enclosure' | ) |
set_favicon_handler | ( | $page = false , |
|
$qs = 'i' |
|||
) |
Set the favicon handler
set_feed_url | ( | $url | ) |
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.
string | array | $url | This is the URL (or array of URLs) that you want to parse. |
Référencé par __construct(), et fetch_data().
set_file | ( | & | $file | ) |
Set an instance of {
SimplePie_File | &$file |
Références $file.
set_file_class | ( | $class = 'SimplePie_File' | ) |
set_image_handler | ( | $page = false , |
|
$qs = 'i' |
|||
) |
Set the handler to enable the display of cached images.
str | $page | Web-accessible path to the handler_image.php file. |
str | $qs | The query string that the value should be passed to. |
Références sanitize().
Référencé par set_stupidly_fast().
set_input_encoding | ( | $encoding = false | ) |
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
string | $encoding | Character encoding |
set_item_class | ( | $class = 'SimplePie_Item' | ) |
set_item_limit | ( | $limit = 0 | ) |
Set the limit for items returned per-feed with multifeeds
integer | $limit | The maximum number of items to return. |
Références $limit.
set_locator_class | ( | $class = 'SimplePie_Locator' | ) |
set_max_checked_feeds | ( | $max = 10 | ) |
Set maximum number of feeds to check with autodiscovery
int | $max | Maximum number of feeds to check |
set_output_encoding | ( | $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 {
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.
string | $encoding |
Références sanitize().
set_parser_class | ( | $class = 'SimplePie_Parser' | ) |
set_rating_class | ( | $class = 'SimplePie_Rating' | ) |
set_raw_data | ( | $data | ) |
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.
string | $data | RSS or Atom data as a string. |
Références $data.
set_restriction_class | ( | $class = 'SimplePie_Restriction' | ) |
set_sanitize_class | ( | $class = 'SimplePie_Sanitize' | ) |
set_source_class | ( | $class = 'SimplePie_Source' | ) |
set_stupidly_fast | ( | $set = false | ) |
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.
bool | $set | Whether to set them or not |
Références enable_order_by_date(), remove_div(), set_image_handler(), strip_attributes(), strip_comments(), et strip_htmltags().
set_timeout | ( | $timeout = 10 | ) |
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.
int | $timeout | The maximum number of seconds to spend waiting to retrieve a feed. |
Références $timeout.
set_url_replacements | ( | $element_attribute = null | ) |
Set element/attribute key/value pairs of HTML attributes containing URLs that need to be resolved relative to the feed
Defaults to |a|, |area|, |blockquote|
Références sanitize().
set_useragent | ( | $ua = SIMPLEPIE_USERAGENT | ) |
#- Set the user agent string
string | $ua | New user agent string. |
|
static |
array Stores the default attributes to be stripped by strip_attributes | ( | $attribs = '' | ) |
Références $attribs, $strip_attributes, et sanitize().
Référencé par set_stupidly_fast().
strip_comments | ( | $strip = false | ) |
Références sanitize().
Référencé par set_stupidly_fast().
array Stores the default tags to be stripped by strip_htmltags | ( | $tags = '' , |
|
$encode = null |
|||
) |
Références $strip_htmltags, null, et sanitize().
Référencé par set_stupidly_fast().
subscribe_url | ( | ) |
Get the URL for the feed
May or may not be different from the URL passed to {
get_feed_url()
since SimplePie 0.8.) Références null, sanitize(), et SIMPLEPIE_CONSTRUCT_IRI.
Référencé par get_base().
$all_discovered_feeds = array() |
Référencé par get_all_discovered_feeds().
$autodiscovery = SIMPLEPIE_LOCATOR_ALL |
$autodiscovery_cache_duration = 604800 |
$cache = true |
Référencé par fetch_data(), et init().
$cache_duration = 3600 |
$cache_location = './cache' |
$cache_name_function = 'md5' |
$config_settings = null |
$data = array() |
Référencé par sanitize(), et set_raw_data().
$feed_url |
$file |
Référencé par __call(), fetch_data(), et set_file().
$force_feed = false |
Référencé par init().
$image_handler = '' |
$item_limit = 0 |
$max_checked_feeds = 10 |
$multifeed_objects = array() |
$multifeed_url = array() |
$order_by_date = true |
$raw_data |
Référencé par get_raw_data().
$registry |
Référencé par get_registry().
$strip_attributes = array('bgsound', 'class', 'expr', 'id', 'style', 'onclick', 'onerror', 'onfinish', 'onmouseover', 'onmouseout', 'onfocus', 'onblur', 'lowsrc', 'dynsrc') |
Référencé par strip_attributes().
$strip_htmltags = array('base', 'blink', 'body', 'doctype', 'embed', 'font', 'form', 'frame', 'frameset', 'html', 'iframe', 'input', 'marquee', 'meta', 'noscript', 'object', 'param', 'script', 'style') |
Référencé par strip_htmltags().
$timeout = 10 |
Référencé par init(), et set_timeout().
$useragent = SIMPLEPIE_USERAGENT |
Référencé par init().