Support Joomla!

Packages

Package: SimplePie

License

Content on this site is copyright © 2005 - 2008 Open Source Matters Inc and can be used in accordance with the Joomla! Electronic Documentation License. Some parts of this website may be subject to other licenses.

 Class SimplePie_Misc

Description

Located in /simplepie/simplepie.php (line 9071)

Class SimplePie_Misc
Method Summary
Static method static string codepoint_to_utf8 (int $codepoint)
Static method static string entities_decode (string $data)
Static method static array parse_str (string $str)
Static method static bool stripos (object $haystack, string $needle, [int $offset = 0])
Static method static string windows_1252_to_utf8 (string $string)
Method void absolutize_url ( $relative,  $base)
Method void array_unique ( $array)
Method void atom_03_construct_type ( $attribs)
Method void atom_10_construct_type ( $attribs)
Method void atom_10_content_construct_type ( $attribs)
Method void change_encoding ( $data,  $input,  $output)
Method void compress_parse_url ([ $scheme = ''], [ $authority = ''], [ $path = ''], [ $query = ''], [ $fragment = ''])
Method void display_cached_file (str $identifier_url, [str $cache_location = './cache'], [str $cache_extension = 'spc'], [str $cache_class = 'SimplePie_Cache'], [str $cache_name_function = 'md5'])
Method void element_implode ( $element)
Method void encoding ( $charset)
Method void error ( $message,  $level,  $file,  $line)
Method void fix_protocol ( $url, [ $http = 1])
Method void get_element ( $realname,  $string)
Method void htmlspecialchars_decode ( $string,  $quote_style)
Method void is_isegment_nz_nc ( $string)
Method void is_subclass_of ( $class1,  $class2)
Method void normalize_url ( $url)
Method void parse_date ( $dt)
Method void parse_mime ( $mime)
Method void parse_url ( $url)
Method void remove_dot_segments ( $input)
Method void space_seperated_tokens ( $string)
Method string strip_comments (string $data)
Method void time_hms ( $seconds)
Method string uncomment_rfc822 ( $string, string $data)
Method string utf8_bad_replace (string $str)
Method array xml_encoding (string $data)
Methods
absolutize_url (line 9101)
void absolutize_url ( $relative,  $base)
  • $relative
  • $base
array_unique (line 11064)
void array_unique ( $array)
  • $array
atom_03_construct_type (line 10951)
void atom_03_construct_type ( $attribs)
  • $attribs
atom_10_construct_type (line 10987)
void atom_10_construct_type ( $attribs)
  • $attribs
atom_10_content_construct_type (line 11009)
void atom_10_content_construct_type ( $attribs)
  • $attribs
change_encoding (line 9409)
void change_encoding ( $data,  $input,  $output)
  • $data
  • $input
  • $output
codepoint_to_utf8 (line 11114)

Converts a unicode codepoint to a UTF-8 character

  • return: UTF-8 character
  • access: public
string codepoint_to_utf8 (int $codepoint)
  • int $codepoint: Unicode codepoint
compress_parse_url (line 9329)
void compress_parse_url ([ $scheme = ''], [ $authority = ''], [ $path = ''], [ $query = ''], [ $fragment = ''])
  • $scheme
  • $authority
  • $path
  • $query
  • $fragment
display_cached_file (line 9263)

If a file has been cached, retrieve and display it.

This is most useful for caching images (get_favicon(), etc.), however it works for all cached files. This WILL NOT display ANY file/image/page/whatever, but rather only display what has already been cached by SimplePie.

void display_cached_file (str $identifier_url, [str $cache_location = './cache'], [str $cache_extension = 'spc'], [str $cache_class = 'SimplePie_Cache'], [str $cache_name_function = 'md5'])
  • str $identifier_url: URL that is used to identify the content. This may or may not be the actual URL of the live content.
  • str $cache_location: Location of SimplePie's cache. Defaults to './cache'.
  • str $cache_extension: The file extension that the file was cached with. Defaults to 'spc'.
  • str $cache_class: Name of the cache-handling class being used in SimplePie. Defaults to 'SimplePie_Cache', and should be left as-is unless you've overloaded the class.
  • str $cache_name_function: Obsolete. Exists for backwards compatibility reasons only.
element_implode (line 9198)
void element_implode ( $element)
  • $element
encoding (line 9450)
void encoding ( $charset)
  • $charset
entities_decode (line 10860)

Decode HTML entities

  • return: Output data
  • access: public
string entities_decode (string $data)
  • string $data: Input data
error (line 9217)
void error ( $message,  $level,  $file,  $line)
  • $message
  • $level
  • $file
  • $line
fix_protocol (line 9285)
void fix_protocol ( $url, [ $http = 1])
  • $url
  • $http
get_curl_version (line 10766)
void get_curl_version ()
get_element (line 9161)
void get_element ( $realname,  $string)
  • $realname
  • $string
htmlspecialchars_decode (line 10939)
void htmlspecialchars_decode ( $string,  $quote_style)
  • $string
  • $quote_style
is_isegment_nz_nc (line 11040)
void is_isegment_nz_nc ( $string)
  • $string
is_subclass_of (line 10787)
void is_subclass_of ( $class1,  $class2)
  • $class1
  • $class2
normalize_url (line 9340)
void normalize_url ( $url)
  • $url
output_javascript (line 11326)
void output_javascript ()
parse_date (line 10846)
void parse_date ( $dt)
  • $dt
parse_mime (line 10927)
void parse_mime ( $mime)
  • $mime
parse_str (line 11198)

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

array parse_str (string $str)
  • string $str: The input string.
parse_url (line 9317)
void parse_url ( $url)
  • $url
percent_encoding_normalization (line 9346)
void percent_encoding_normalization ( $match)
  • $match
remove_dot_segments (line 9107)
void remove_dot_segments ( $input)
  • $input
space_seperated_tokens (line 11045)
void space_seperated_tokens ( $string)
  • $string
stripos (line 11161)

Re-implementation of PHP 5's stripos()

Returns the numeric position of the first occurrence of needle in the haystack string.

  • return: If needle is not found, stripos() will return boolean false.
bool stripos (object $haystack, string $needle, int $offset)
  • object $haystack
  • string $needle: Note that the needle may be a string of one or more characters. If needle is not a string, it is converted to an integer and applied as the ordinal value of a character.
  • int $offset: The optional offset parameter allows you to specify which character in haystack to start searching. The position returned is still relative to the beginning of haystack.
strip_comments (line 10828)

Strip HTML comments

  • return: Comment stripped string
  • access: public
string strip_comments (string $data)
  • string $data: Data to strip comments from
time_hms (line 9073)
void time_hms ( $seconds)
  • $seconds
uncomment_rfc822 (line 10873)

Remove RFC822 comments

  • return: Comment stripped string
  • access: public
string uncomment_rfc822 ( $string, string $data)
  • string $data: Data to strip comments from
  • $string
utf8_bad_replace (line 9370)

Remove bad UTF-8 bytes

PCRE Pattern to locate bad bytes in a UTF-8 string comes from W3C FAQ: Multilingual Forms (modified to include full ASCII range)

string utf8_bad_replace (string $str)
  • string $str: String to remove bad UTF-8 bytes from
windows_1252_to_utf8 (line 9402)

Converts a Windows-1252 encoded string to a UTF-8 encoded string

  • return: UTF-8 encoded string
  • access: public
string windows_1252_to_utf8 (string $string)
  • string $string: Windows-1252 encoded string
xml_encoding (line 11226)

Detect XML encoding, as per XML 1.0 Appendix F.1

  • return: Possible encodings
  • todo: Add support for EBCDIC
array xml_encoding (string $data)
  • string $data: XML data

Documentation generated on Sat, 14 Nov 2009 11:20:28 +0000 by phpDocumentor 1.3.1