Class SimplePie_Misc

Description
Method Summary
 static string codepoint_to_utf8 (int $codepoint)
 static string entities_decode (string $data)
 static array parse_str (string $str)
 static bool stripos (object $haystack, string $needle, [int $offset = 0])
 static string windows_1252_to_utf8 (string $string)
 void absolutize_url ( $relative,  $base)
 void array_unique ( $array)
 void atom_03_construct_type ( $attribs)
 void atom_10_construct_type ( $attribs)
 void atom_10_content_construct_type ( $attribs)
 void change_encoding ( $data,  $input,  $output)
 void compress_parse_url ([ $scheme = ''], [ $authority = ''], [ $path = ''], [ $query = ''], [ $fragment = ''])
 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'])
 void element_implode ( $element)
 void encoding ( $charset)
 void error ( $message,  $level,  $file,  $line)
 void fix_protocol ( $url, [ $http = 1])
 void get_element ( $realname,  $string)
 void htmlspecialchars_decode ( $string,  $quote_style)
 void is_isegment_nz_nc ( $string)
 void is_subclass_of ( $class1,  $class2)
 void normalize_url ( $url)
 void parse_date ( $dt)
 void parse_mime ( $mime)
 void parse_url ( $url)
 void remove_dot_segments ( $input)
 void space_seperated_tokens ( $string)
 string strip_comments (string $data)
 void time_hms ( $seconds)
 string uncomment_rfc822 ( $string, string $data)
 string utf8_bad_replace (string $str)
 array xml_encoding (string $data)
Methods
static codepoint_to_utf8 (line 11118)

Converts a unicode codepoint to a UTF-8 character

  • return: UTF-8 character
  • access: public
static string codepoint_to_utf8 (int $codepoint)
  • int $codepoint: Unicode codepoint
static entities_decode (line 10864)

Decode HTML entities

  • return: Output data
  • access: public
static string entities_decode (string $data)
  • string $data: Input data
static parse_str (line 11202)

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

static array parse_str (string $str)
  • string $str: The input string.
static stripos (line 11165)

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.
static bool stripos (object $haystack, string $needle, [int $offset = 0])
  • 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.
static windows_1252_to_utf8 (line 9406)

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

  • return: UTF-8 encoded string
  • access: public
static string windows_1252_to_utf8 (string $string)
  • string $string: Windows-1252 encoded string
absolutize_url (line 9105)
void absolutize_url ( $relative,  $base)
  • $relative
  • $base
array_unique (line 11068)
void array_unique ( $array)
  • $array
atom_03_construct_type (line 10955)
void atom_03_construct_type ( $attribs)
  • $attribs
atom_10_construct_type (line 10991)
void atom_10_construct_type ( $attribs)
  • $attribs
atom_10_content_construct_type (line 11013)
void atom_10_content_construct_type ( $attribs)
  • $attribs
change_encoding (line 9413)
void change_encoding ( $data,  $input,  $output)
  • $data
  • $input
  • $output
compress_parse_url (line 9333)
void compress_parse_url ([ $scheme = ''], [ $authority = ''], [ $path = ''], [ $query = ''], [ $fragment = ''])
  • $scheme
  • $authority
  • $path
  • $query
  • $fragment
display_cached_file (line 9267)

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 9202)
void element_implode ( $element)
  • $element
encoding (line 9454)
void encoding ( $charset)
  • $charset
error (line 9221)
void error ( $message,  $level,  $file,  $line)
  • $message
  • $level
  • $file
  • $line
fix_protocol (line 9289)
void fix_protocol ( $url, [ $http = 1])
  • $url
  • $http
get_curl_version (line 10770)
void get_curl_version ()
get_element (line 9165)
void get_element ( $realname,  $string)
  • $realname
  • $string
htmlspecialchars_decode (line 10943)
void htmlspecialchars_decode ( $string,  $quote_style)
  • $string
  • $quote_style
is_isegment_nz_nc (line 11044)
void is_isegment_nz_nc ( $string)
  • $string
is_subclass_of (line 10791)
void is_subclass_of ( $class1,  $class2)
  • $class1
  • $class2
normalize_url (line 9344)
void normalize_url ( $url)
  • $url
output_javascript (line 11330)
void output_javascript ()
parse_date (line 10850)
void parse_date ( $dt)
  • $dt
parse_mime (line 10931)
void parse_mime ( $mime)
  • $mime
parse_url (line 9321)
void parse_url ( $url)
  • $url
percent_encoding_normalization (line 9350)
void percent_encoding_normalization ( $match)
  • $match
remove_dot_segments (line 9111)
void remove_dot_segments ( $input)
  • $input
space_seperated_tokens (line 11049)
void space_seperated_tokens ( $string)
  • $string
strip_comments (line 10832)

Strip HTML comments

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

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 9374)

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
xml_encoding (line 11230)

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 Tue, 19 Nov 2013 15:13:49 +0100 by phpDocumentor 1.4.3