PHP Класс SimplePie_Misc, ojs

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
absolutize_url ( $relative, $base )
array_unique ( $array )
atom_03_construct_type ( $attribs )
atom_10_construct_type ( $attribs )
atom_10_content_construct_type ( $attribs )
change_encoding ( $data, $input, $output )
codepoint_to_utf8 ( integer $codepoint ) : string Converts a unicode codepoint to a UTF-8 character
compress_parse_url ( $scheme = '', $authority = '', $path = '', $query = '', $fragment = '' )
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.
element_implode ( $element )
encoding ( $charset )
entities_decode ( string $data ) : string Decode HTML entities
error ( $message, $level, $file, $line )
fix_protocol ( $url, $http = 1 )
get_curl_version ( )
get_element ( $realname, $string )
htmlspecialchars_decode ( $string, $quote_style )
is_isegment_nz_nc ( $string )
is_subclass_of ( $class1, $class2 )
normalize_url ( $url )
output_javascript ( )
parse_date ( $dt )
parse_mime ( $mime )
parse_str ( string $str ) : array Similar to parse_str()
parse_url ( $url )
percent_encoding_normalization ( $match )
remove_dot_segments ( $input )
space_seperated_tokens ( $string )
strip_comments ( string $data ) : string Strip HTML comments
stripos ( object $haystack, string $needle, integer $offset ) : boolean Re-implementation of PHP 5's stripos()
time_hms ( $seconds )
uncomment_rfc822 ( $string ) : string Remove RFC822 comments
utf8_bad_replace ( string $str ) : string Remove bad UTF-8 bytes
windows_1252_to_utf8 ( string $string ) : string Converts a Windows-1252 encoded string to a UTF-8 encoded string
xml_encoding ( string $data ) : array Detect XML encoding, as per XML 1.0 Appendix F.1

Описание методов

absolutize_url() публичный Метод

public absolutize_url ( $relative, $base )

array_unique() публичный Метод

public array_unique ( $array )

atom_03_construct_type() публичный Метод

public atom_03_construct_type ( $attribs )

atom_10_construct_type() публичный Метод

public atom_10_construct_type ( $attribs )

atom_10_content_construct_type() публичный Метод

public atom_10_content_construct_type ( $attribs )

change_encoding() публичный Метод

public change_encoding ( $data, $input, $output )

codepoint_to_utf8() публичный Метод

Converts a unicode codepoint to a UTF-8 character
public codepoint_to_utf8 ( integer $codepoint ) : string
$codepoint integer Unicode codepoint
Результат string UTF-8 character

compress_parse_url() публичный Метод

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

display_cached_file() публичный Метод

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.
См. также: SimplePie::get_favicon()
public display_cached_file ( str $identifier_url, str $cache_location = './cache', str $cache_extension = 'spc', str $cache_class = 'SimplePie_Cache', str $cache_name_function = 'md5' )
$identifier_url str URL that is used to identify the content. This may or may not be the actual URL of the live content.
$cache_location str Location of SimplePie's cache. Defaults to './cache'.
$cache_extension str The file extension that the file was cached with. Defaults to 'spc'.
$cache_class str 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.
$cache_name_function str Obsolete. Exists for backwards compatibility reasons only.

element_implode() публичный Метод

public element_implode ( $element )

encoding() публичный Метод

public encoding ( $charset )

entities_decode() публичный Метод

Decode HTML entities
public entities_decode ( string $data ) : string
$data string Input data
Результат string Output data

error() публичный Метод

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

fix_protocol() публичный Метод

public fix_protocol ( $url, $http = 1 )

get_curl_version() публичный Метод

public get_curl_version ( )

get_element() публичный Метод

public get_element ( $realname, $string )

htmlspecialchars_decode() публичный Метод

public htmlspecialchars_decode ( $string, $quote_style )

is_isegment_nz_nc() публичный Метод

public is_isegment_nz_nc ( $string )

is_subclass_of() публичный Метод

public is_subclass_of ( $class1, $class2 )

normalize_url() публичный Метод

public normalize_url ( $url )

output_javascript() публичный Метод

public output_javascript ( )

parse_date() публичный Метод

public parse_date ( $dt )

parse_mime() публичный Метод

public parse_mime ( $mime )

parse_str() публичный Метод

Returns an associative array of name/value pairs, where the value is an array of values that have used the same name
public parse_str ( string $str ) : array
$str string The input string.
Результат array

parse_url() публичный Метод

public parse_url ( $url )

percent_encoding_normalization() публичный Метод

public percent_encoding_normalization ( $match )

remove_dot_segments() публичный Метод

public remove_dot_segments ( $input )

space_seperated_tokens() публичный Метод

public space_seperated_tokens ( $string )

strip_comments() публичный Метод

Strip HTML comments
public strip_comments ( string $data ) : string
$data string Data to strip comments from
Результат string Comment stripped string

stripos() публичный Метод

Returns the numeric position of the first occurrence of needle in the haystack string.
public stripos ( object $haystack, string $needle, integer $offset ) : boolean
$haystack object
$needle string 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.
$offset integer 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.
Результат boolean If needle is not found, stripos() will return boolean false.

time_hms() публичный Метод

public time_hms ( $seconds )

uncomment_rfc822() публичный Метод

Remove RFC822 comments
public uncomment_rfc822 ( $string ) : string
Результат string Comment stripped string

utf8_bad_replace() публичный Метод

PCRE Pattern to locate bad bytes in a UTF-8 string comes from W3C FAQ: Multilingual Forms (modified to include full ASCII range)
См. также: http://www.w3.org/International/questions/qa-forms-utf-8
Автор: Geoffrey Sneddon
public utf8_bad_replace ( string $str ) : string
$str string String to remove bad UTF-8 bytes from
Результат string UTF-8 string

windows_1252_to_utf8() публичный Метод

Converts a Windows-1252 encoded string to a UTF-8 encoded string
public windows_1252_to_utf8 ( string $string ) : string
$string string Windows-1252 encoded string
Результат string UTF-8 encoded string

xml_encoding() публичный Метод

Detect XML encoding, as per XML 1.0 Appendix F.1
public xml_encoding ( string $data ) : array
$data string XML data
Результат array Possible encodings