class SimplePie_Misc


Located at : UKNOWVA_ROOT/libraries/simplepie/simplepie.php

Methods

time_hms($seconds)

No description

absolutize_url($relative, $base)

No description

remove_dot_segments($input)

No description

get_element($realname, $string)

No description

element_implode($element)

No description

error($message, $level, $file, $line)

No description

display_cached_file(str $identifier_url, str $cache_location = './cache', str $cache_extension = 'spc', str $cache_class = 'SimplePie_Cache', str $cache_name_function = 'md5')

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

fix_protocol($url, $http = 1)

No description

parse_url($url)

No description

compress_parse_url($scheme = '', $authority = '', $path = '', $query = '', $fragment = '')

No description

normalize_url($url)

No description

percent_encoding_normalization($match)

No description

string
utf8_bad_replace(string $str)

Remove bad UTF-8 bytes

string
windows_1252_to_utf8(string $string)

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

change_encoding($data, $input, $output)

No description

encoding($charset)

No description

get_curl_version()

No description

is_subclass_of($class1, $class2)

No description

string
strip_comments(string $data)

Strip HTML comments

parse_date($dt)

No description

string
entities_decode(string $data)

Decode HTML entities

string
uncomment_rfc822($string)

Remove RFC822 comments

parse_mime($mime)

No description

htmlspecialchars_decode($string, $quote_style)

No description

atom_03_construct_type($attribs)

No description

atom_10_construct_type($attribs)

No description

atom_10_content_construct_type($attribs)

No description

is_isegment_nz_nc($string)

No description

space_seperated_tokens($string)

No description

array_unique($array)

No description

string
codepoint_to_utf8(int $codepoint)

Converts a unicode codepoint to a UTF-8 character

bool
stripos(object $haystack, string $needle, int $offset)

Re-implementation of PHP 5's stripos()

array
parse_str(string $str)

Similar to parse_str()

array
xml_encoding(string $data)

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

output_javascript()

No description

Details

at line 9073
time_hms($seconds)

Parameters

$seconds

at line 9101
absolutize_url($relative, $base)

Parameters

$relative
$base

at line 9107
remove_dot_segments($input)

Parameters

$input

at line 9161
get_element($realname, $string)

Parameters

$realname
$string

at line 9198
element_implode($element)

Parameters

$element

at line 9217
error($message, $level, $file, $line)

Parameters

$message
$level
$file
$line

at line 9263
display_cached_file(str $identifier_url, str $cache_location = './cache', str $cache_extension = 'spc', str $cache_class = 'SimplePie_Cache', str $cache_name_function = 'md5')

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.

Parameters

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.

See also

SimplePie::get_favicon()

at line 9285
fix_protocol($url, $http = 1)

Parameters

$url
$http

at line 9317
parse_url($url)

Parameters

$url

at line 9329
compress_parse_url($scheme = '', $authority = '', $path = '', $query = '', $fragment = '')

Parameters

$scheme
$authority
$path
$query
$fragment

at line 9340
normalize_url($url)

Parameters

$url

at line 9346
percent_encoding_normalization($match)

Parameters

$match

at line 9370
string utf8_bad_replace(string $str)

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)

Parameters

string $str String to remove bad UTF-8 bytes from

Return Value

string UTF-8 string

See also

http://www.w3.org/International/questions/qa-forms-utf-8

at line 9402
string windows_1252_to_utf8(string $string)

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

Parameters

string $string Windows-1252 encoded string

Return Value

string UTF-8 encoded string

at line 9409
change_encoding($data, $input, $output)

Parameters

$data
$input
$output

at line 9450
encoding($charset)

Parameters

$charset

at line 10766
get_curl_version()

at line 10787
is_subclass_of($class1, $class2)

Parameters

$class1
$class2

at line 10828
string strip_comments(string $data)

Strip HTML comments

Parameters

string $data Data to strip comments from

Return Value

string Comment stripped string

at line 10846
parse_date($dt)

Parameters

$dt

at line 10860
string entities_decode(string $data)

Decode HTML entities

Parameters

string $data Input data

Return Value

string Output data

at line 10873
string uncomment_rfc822($string)

Remove RFC822 comments

Parameters

$string

Return Value

string Comment stripped string

at line 10927
parse_mime($mime)

Parameters

$mime

at line 10939
htmlspecialchars_decode($string, $quote_style)

Parameters

$string
$quote_style

at line 10951
atom_03_construct_type($attribs)

Parameters

$attribs

at line 10987
atom_10_construct_type($attribs)

Parameters

$attribs

at line 11009
atom_10_content_construct_type($attribs)

Parameters

$attribs

at line 11040
is_isegment_nz_nc($string)

Parameters

$string

at line 11045
space_seperated_tokens($string)

Parameters

$string

at line 11064
array_unique($array)

Parameters

$array

at line 11114
string codepoint_to_utf8(int $codepoint)

Converts a unicode codepoint to a UTF-8 character

Parameters

int $codepoint Unicode codepoint

Return Value

string UTF-8 character

at line 11161
bool stripos(object $haystack, string $needle, int $offset)

Re-implementation of PHP 5's stripos()

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

Parameters

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.

Return Value

bool If needle is not found, stripos() will return boolean false.

at line 11198
array parse_str(string $str)

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

Parameters

string $str The input string.

Return Value

array

at line 11226
array xml_encoding(string $data)

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

Parameters

string $data XML data

Return Value

array Possible encodings

at line 11326
output_javascript()