Class SimplePie_Misc

Description

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


	
			
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 method codepoint_to_utf8 (line 11114)

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 method entities_decode (line 10860)

Decode HTML entities

  • return: Output data
  • access: public
static string entities_decode (string $data)
  • string $data: Input data
static method 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

static array parse_str (string $str)
  • string $str: The input string.
static method 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.
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 method 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
static string windows_1252_to_utf8 (string $string)
  • string $string: Windows-1252 encoded string
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
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
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_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
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
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 Mon, 25 Jun 2012 13:59:35 -0500 by phpDocumentor 1.4.4