| | |
| | | * @todo phpDoc comments |
| | | */ |
| | | |
| | | |
| | | /** |
| | | * SimplePie Name |
| | | */ |
| | |
| | | */ |
| | | class simplepie |
| | | { |
| | | |
| | | /** |
| | | * @var array Raw data |
| | | * @access private |
| | |
| | | */ |
| | | var $strip_htmltags = array('base', 'blink', 'body', 'doctype', 'embed', 'font', 'form', 'frame', 'frameset', 'html', 'iframe', 'input', 'marquee', 'meta', 'noscript', 'object', 'param', 'script', 'style'); |
| | | |
| | | |
| | | /** |
| | | * The SimplePie class contains feed level data and options |
| | | * |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Used for converting object to a string |
| | | */ |
| | |
| | | { |
| | | return md5(serialize($this->data)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Remove items that link back to this before destroying this object |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Force the given data/URL to be treated as a feed no matter what it |
| | | * appears like |
| | |
| | | { |
| | | $this->force_feed = (bool) $enable; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * This is the URL of the feed you want to parse. |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Provides an instance of SimplePie_File to use as a feed |
| | | * |
| | |
| | | return false; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Allows you to use a string of RSS/Atom data instead of a remote feed. |
| | | * |
| | |
| | | $this->raw_data = $data; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Allows you to override the default timeout for fetching remote feeds. |
| | | * |
| | |
| | | $this->timeout = (int) $timeout; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Forces SimplePie to use fsockopen() instead of the preferred cURL |
| | | * functions. |
| | |
| | | { |
| | | $this->force_fsockopen = (bool) $enable; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Outputs the raw XML content of the feed, after it has gone through |
| | |
| | | $this->xml_dump = (bool) $enable; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Enables/disables caching in SimplePie. |
| | | * |
| | |
| | | $this->cache = (bool) $enable; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Set the length of time (in seconds) that the contents of a feed |
| | | * will be cached. |
| | |
| | | { |
| | | $this->cache_duration = (int) $seconds; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Set the length of time (in seconds) that the autodiscovered feed |
| | |
| | | $this->autodiscovery_cache_duration = (int) $seconds; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Set the file system location where the cached files should be stored. |
| | | * |
| | |
| | | $this->cache_location = (string) $location; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Determines whether feed items should be sorted into reverse chronological order. |
| | | * |
| | |
| | | { |
| | | $this->order_by_date = (bool) $enable; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Allows you to override the character encoding reported by the feed. |
| | |
| | | $this->input_encoding = false; |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Set how much feed autodiscovery to do |
| | |
| | | $this->autodiscovery = (int) $level; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Allows you to change which class SimplePie uses for caching. |
| | | * Useful when you are overloading or extending SimplePie's default classes. |
| | |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Allows you to change which class SimplePie uses for auto-discovery. |
| | |
| | | return false; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Allows you to change which class SimplePie uses for XML parsing. |
| | | * Useful when you are overloading or extending SimplePie's default classes. |
| | |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Allows you to change which class SimplePie uses for remote file fetching. |
| | |
| | | return false; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Allows you to change which class SimplePie uses for data sanitization. |
| | | * Useful when you are overloading or extending SimplePie's default classes. |
| | |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Allows you to change which class SimplePie uses for handling feed items. |
| | |
| | | return false; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Allows you to change which class SimplePie uses for handling author data. |
| | | * Useful when you are overloading or extending SimplePie's default classes. |
| | |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Allows you to change which class SimplePie uses for handling category data. |
| | |
| | | return false; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Allows you to change which class SimplePie uses for feed enclosures. |
| | | * Useful when you are overloading or extending SimplePie's default classes. |
| | |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Allows you to change which class SimplePie uses for <media:text> captions |
| | |
| | | return false; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Allows you to change which class SimplePie uses for <media:copyright> |
| | | * Useful when you are overloading or extending SimplePie's default classes. |
| | |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Allows you to change which class SimplePie uses for <media:credit> |
| | |
| | | return false; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Allows you to change which class SimplePie uses for <media:rating> |
| | | * Useful when you are overloading or extending SimplePie's default classes. |
| | |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Allows you to change which class SimplePie uses for <media:restriction> |
| | |
| | | return false; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Allows you to change which class SimplePie uses for content-type sniffing. |
| | | * Useful when you are overloading or extending SimplePie's default classes. |
| | |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Allows you to change which class SimplePie uses item sources. |
| | |
| | | return false; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Allows you to override the default user agent string. |
| | | * |
| | |
| | | { |
| | | $this->useragent = (string) $ua; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Set callback function to create cache filename with |
| | |
| | | $this->cache_name_function = $function; |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Set javascript query string parameter |
| | |
| | | $this->javascript = false; |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Set options to make SP as fast as possible. Forgoes a |
| | |
| | | $this->set_image_handler(false); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Set maximum number of feeds to check with autodiscovery |
| | |
| | | $this->sanitize->strip_comments($strip); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Set element/attribute key/value pairs of HTML attributes |
| | | * containing URLs that need to be resolved relative to the feed |
| | |
| | | { |
| | | $this->sanitize->set_url_replacements($element_attribute); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Set the handler to enable the display of cached favicons. |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Set the handler to enable the display of cached images. |
| | | * |
| | |
| | | $this->image_handler = ''; |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Set the limit for items returned per-feed with multifeeds. |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Return the error message for the occured error |
| | | * |
| | |
| | | return $this->data['type']; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Returns the URL for the favicon of the feed's website. |
| | | * |
| | |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * @todo If we have a perm redirect we should return the new URL |
| | |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Creates the subscribe_* methods' return data |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Added for parity between the parent-level and the item/entry-level. |
| | | */ |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * @static |
| | | */ |
| | |
| | | { |
| | | return $a->get_date('U') <= $b->get_date('U'); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * @static |
| | |
| | | return array(); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | class SimplePie_Item |
| | |
| | | { |
| | | return md5(serialize($this->data)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Remove items that link back to this before destroying this object |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * @todo Add ability to prefer one type of content over another (in a media group). |
| | | */ |
| | |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Grabs all available enclosures (podcasts, etc.) |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Creates the add_to_* methods' return data |
| | | * |
| | |
| | | { |
| | | return $this->add_to_service('http://www.technorati.com/search/'); |
| | | } |
| | | |
| | | } |
| | | |
| | | class SimplePie_Source |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Added for parity between the parent-level and the item/entry-level. |
| | | */ |
| | |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | class SimplePie_Author |
| | |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | class SimplePie_Category |
| | |
| | | return $this->get_term(); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | class SimplePie_Enclosure |
| | |
| | | return $this->embed($options, true); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * @todo If the dimensions for media:content are defined, use them when width/height are set to 'auto'. |
| | | */ |
| | |
| | | return $type; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | class SimplePie_Caption |
| | |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | class SimplePie_Credit |
| | |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | class SimplePie_Copyright |
| | |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | class SimplePie_Rating |
| | |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | class SimplePie_Restriction |
| | |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | class SimplePie_HTTP_Parser |
| | | { |
| | | |
| | | /** |
| | | * HTTP Version |
| | | * |
| | |
| | | */ |
| | | var $value = ''; |
| | | |
| | | |
| | | /** |
| | | * Create an instance of the class with the input data |
| | | * |
| | |
| | | $this->data = $data; |
| | | $this->data_length = strlen($this->data); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Parse the input data |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Check whether there is data beyond the pointer |
| | | * |
| | |
| | | { |
| | | return (bool) ($this->position < $this->data_length); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * See if the next character is LWS |
| | |
| | | && isset($this->data[$this->position + 1]) |
| | | && ($this->data[$this->position + 1] === "\x09" || $this->data[$this->position + 1] === "\x20"))); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Parse the HTTP version |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Parse the status code |
| | | * |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Parse the reason phrase |
| | | * |
| | |
| | | $this->position += $len + 1; |
| | | $this->state = 'new_line'; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Deal with a new line, shifting data around as needed |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Parse a header name |
| | | * |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Parse LWS, replacing consecutive LWS characters with a single space |
| | | * |
| | |
| | | } while ($this->has_data() && $this->is_linear_whitespace()); |
| | | $this->value .= "\x20"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * See what state to move to while within non-quoted header values |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Parse a header value while outside quotes |
| | | * |
| | |
| | | $this->position += $len; |
| | | $this->state = 'value'; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * See what state to move to while within quoted header values |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Parse a header value while within quotes |
| | | * |
| | |
| | | $this->state = 'value'; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Parse an escaped character within quotes |
| | | * |
| | |
| | | $this->state = 'quote'; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Parse the body |
| | | * |
| | |
| | | $this->body = substr($this->data, $this->position); |
| | | $this->state = 'emit'; |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | class SimplePie_gzdecode |
| | | { |
| | | |
| | | /** |
| | | * Compressed data |
| | | * |
| | |
| | | */ |
| | | var $comment; |
| | | |
| | | |
| | | /** |
| | | * Don't allow anything to be set |
| | | * |
| | |
| | | { |
| | | trigger_error("Cannot write property $name", E_USER_ERROR); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Set the compressed string and related properties |
| | |
| | | $this->compressed_data = $data; |
| | | $this->compressed_size = strlen($data); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Decode the GZIP stream |
| | |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | class SimplePie_Cache |
| | | { |
| | | |
| | | |
| | | /** |
| | | * Don't call the constructor. Please. |
| | | * |
| | |
| | | { |
| | | trigger_error('Please call SimplePie_Cache::create() instead of the constructor', E_USER_ERROR); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Create a new SimplePie_Cache object |
| | |
| | | return new SimplePie_Cache_File($location, $filename, $extension); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | class SimplePie_Cache_File |
| | |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | } |
| | | |
| | | class SimplePie_Cache_DB |
| | |
| | | } |
| | | return array(serialize($data->data), $items_by_id); |
| | | } |
| | | |
| | | } |
| | | |
| | | class SimplePie_Cache_MySQL extends SimplePie_Cache_DB |
| | |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | class SimplePie_Misc |
| | |
| | | return $message; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * If a file has been cached, retrieve and display it. |
| | | * |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Remove bad UTF-8 bytes |
| | | * |
| | |
| | | return ''; |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Converts a Windows-1252 encoded string to a UTF-8 encoded string |
| | |
| | | return false; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Strip HTML comments |
| | | * |
| | |
| | | $decoder = new SimplePie_Decode_HTML_Entities($data); |
| | | return $decoder->parse(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Remove RFC822 comments |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Converts a unicode codepoint to a UTF-8 character |
| | | * |
| | |
| | | return "\xEF\xBF\xBD"; |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Re-implementation of PHP 5's stripos() |
| | |
| | | return strpos(strtolower($haystack), $needle, $offset); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Similar to parse_str() |
| | |
| | | } |
| | | <?php |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | class SimplePie_Decode_HTML_Entities |
| | | { |
| | | |
| | | /** |
| | | * Data to be parsed |
| | | * |
| | |
| | | */ |
| | | var $position = 0; |
| | | |
| | | |
| | | /** |
| | | * Create an instance of the class with the input data |
| | | * |
| | |
| | | { |
| | | $this->data = $data; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Parse the input data |
| | |
| | | } |
| | | return $this->data; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Consume the next byte |
| | |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Consume a range of characters |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Unconsume one byte |
| | | * |
| | |
| | | $this->consumed = substr($this->consumed, 0, -1); |
| | | $this->position--; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Decode an entity |
| | |
| | | break; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | class SimplePie_IRI |
| | | { |
| | | |
| | | /** |
| | | * Scheme |
| | | * |
| | |
| | | */ |
| | | var $valid = array(); |
| | | |
| | | |
| | | /** |
| | | * Return the entire IRI when you try and read the object as a string |
| | | * |
| | |
| | | { |
| | | return $this->get_iri(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Create a new IRI object, from a specified string |
| | |
| | | return $target; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Parse an IRI into scheme/authority/path/query/fragment segments |
| | | * |
| | |
| | | } |
| | | return array('scheme' => $match[2], 'authority' => $match[4], 'path' => $match[5], 'query' => $match[7], 'fragment' => $match[9]); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Remove dot segments from a path |
| | |
| | | } |
| | | return $output . $input; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Replace invalid character with percent encoding |
| | |
| | | return $string; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Check if the object represents a valid IRI |
| | | * |
| | |
| | | { |
| | | return array_sum($this->valid) === count($this->valid); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Set the scheme. Returns true on success, false on failure (if there are |
| | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Set the authority. Returns true on success, false on failure (if there are |
| | | * any invalid characters). |
| | |
| | | return $this->set_userinfo($userinfo) && $this->set_host($authority) && $this->set_port($port); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Set the userinfo. |
| | | * |
| | |
| | | $this->valid[__FUNCTION__] = true; |
| | | return true; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Set the host. Returns true on success, false on failure (if there are |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Set the port. Returns true on success, false on failure (if there are |
| | | * any invalid characters). |
| | |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Set the path. |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Set the query. |
| | | * |
| | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Set the fragment. |
| | | * |
| | |
| | | $this->valid[__FUNCTION__] = true; |
| | | return true; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Get the complete IRI |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Get the scheme |
| | | * |
| | |
| | | { |
| | | return $this->scheme; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Get the complete authority |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Get the user information |
| | | * |
| | |
| | | { |
| | | return $this->userinfo; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Get the host |
| | |
| | | return $this->host; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Get the port |
| | | * |
| | |
| | | { |
| | | return $this->port; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Get the path |
| | |
| | | return $this->path; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Get the query |
| | | * |
| | |
| | | return $this->query; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Get the fragment |
| | | * |
| | |
| | | { |
| | | return $this->fragment; |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | class SimplePie_Net_IPv6 |
| | | { |
| | | |
| | | |
| | | /** |
| | | * Removes a possible existing netmask specification of an IP address. |
| | | * |
| | |
| | | } |
| | | return $addr; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Uncompresses an IPv6 address |
| | |
| | | return $uip; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Splits an IPv6 address into the IPv6 and a possible IPv4 part |
| | | * |
| | |
| | | return array($ip, ''); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Checks an IPv6 address |
| | |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | class SimplePie_Parse_Date |
| | | { |
| | | |
| | | /** |
| | | * Input data |
| | | * |
| | |
| | | */ |
| | | var $user = array(); |
| | | |
| | | |
| | | /** |
| | | * Create new SimplePie_Parse_Date object, and set self::day_pcre, |
| | | * self::month_pcre, and self::built_in |
| | |
| | | return $object; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Parse a date |
| | | * |
| | |
| | | return false; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Add a callback method to parse a date |
| | | * |
| | |
| | | trigger_error('User-supplied function must be a valid callback', E_USER_WARNING); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Parse a superset of W3C-DTF (allows hyphens and colons to be omitted, as |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Remove RFC822 comments |
| | | * |
| | |
| | | |
| | | return $output; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Parse RFC2822's date format |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Parse RFC850's date format |
| | | * |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Parse C99's asctime()'s date format |
| | | * |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Parse dates using strtotime() |
| | | * |
| | |
| | | return $strtotime; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | class SimplePie_Content_Type_Sniffer |
| | | { |
| | | |
| | | /** |
| | | * File object |
| | | * |
| | |
| | | * @access private |
| | | */ |
| | | var $file; |
| | | |
| | | |
| | | /** |
| | | * Create an instance of the class with the input file |
| | |
| | | { |
| | | $this->file = $file; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Get the Content-Type of the specified file |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Sniff text or binary |
| | | * |
| | |
| | | return 'text/plain'; |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Sniff unknown |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Sniff images |
| | | * |
| | |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Sniff HTML |
| | |
| | | |
| | | return 'text/html'; |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | class SimplePie_XML_Declaration_Parser |
| | | { |
| | | |
| | | /** |
| | | * XML Version |
| | | * |
| | |
| | | */ |
| | | var $position = 0; |
| | | |
| | | |
| | | /** |
| | | * Create an instance of the class with the input data |
| | | * |
| | |
| | | $this->data = $data; |
| | | $this->data_length = strlen($this->data); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Parse the input data |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Check whether there is data beyond the pointer |
| | | * |
| | |
| | | { |
| | | return (bool) ($this->position < $this->data_length); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Advance past any whitespace |
| | |
| | | $this->position += $whitespace; |
| | | return $whitespace; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Read value |
| | |
| | | $this->state = false; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | class SimplePie_Locator |
| | |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | } |
| | | |
| | | class SimplePie_Parser |
| | |
| | | } |
| | | return $cache[$string]; |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | { |
| | | $this->output_encoding = (string) $encoding; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Set element/attribute key/value pairs of HTML attributes |
| | |
| | | return ''; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | ?> |