PHP Class SimplePie_Misc, ojs

Afficher le fichier Open project: pkp/ojs Class Usage Examples

Méthodes publiques

Méthode Description
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

Method Details

absolutize_url() public méthode

public absolutize_url ( $relative, $base )

array_unique() public méthode

public array_unique ( $array )

atom_03_construct_type() public méthode

public atom_03_construct_type ( $attribs )

atom_10_construct_type() public méthode

public atom_10_construct_type ( $attribs )

atom_10_content_construct_type() public méthode

public atom_10_content_construct_type ( $attribs )

change_encoding() public méthode

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

codepoint_to_utf8() public méthode

Converts a unicode codepoint to a UTF-8 character
public codepoint_to_utf8 ( integer $codepoint ) : string
$codepoint integer Unicode codepoint
Résultat string UTF-8 character

compress_parse_url() public méthode

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

display_cached_file() public méthode

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.
See also: 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 méthode

public element_implode ( $element )

encoding() public méthode

public encoding ( $charset )

entities_decode() public méthode

Decode HTML entities
public entities_decode ( string $data ) : string
$data string Input data
Résultat string Output data

error() public méthode

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

fix_protocol() public méthode

public fix_protocol ( $url, $http = 1 )

get_curl_version() public méthode

public get_curl_version ( )

get_element() public méthode

public get_element ( $realname, $string )

htmlspecialchars_decode() public méthode

public htmlspecialchars_decode ( $string, $quote_style )

is_isegment_nz_nc() public méthode

public is_isegment_nz_nc ( $string )

is_subclass_of() public méthode

public is_subclass_of ( $class1, $class2 )

normalize_url() public méthode

public normalize_url ( $url )

output_javascript() public méthode

public output_javascript ( )

parse_date() public méthode

public parse_date ( $dt )

parse_mime() public méthode

public parse_mime ( $mime )

parse_str() public méthode

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.
Résultat array

parse_url() public méthode

public parse_url ( $url )

percent_encoding_normalization() public méthode

public percent_encoding_normalization ( $match )

remove_dot_segments() public méthode

public remove_dot_segments ( $input )

space_seperated_tokens() public méthode

public space_seperated_tokens ( $string )

strip_comments() public méthode

Strip HTML comments
public strip_comments ( string $data ) : string
$data string Data to strip comments from
Résultat string Comment stripped string

stripos() public méthode

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.
Résultat boolean If needle is not found, stripos() will return boolean false.

time_hms() public méthode

public time_hms ( $seconds )

uncomment_rfc822() public méthode

Remove RFC822 comments
public uncomment_rfc822 ( $string ) : string
Résultat string Comment stripped string

utf8_bad_replace() public méthode

PCRE Pattern to locate bad bytes in a UTF-8 string comes from W3C FAQ: Multilingual Forms (modified to include full ASCII range)
See also: http://www.w3.org/International/questions/qa-forms-utf-8
Author: Geoffrey Sneddon
public utf8_bad_replace ( string $str ) : string
$str string String to remove bad UTF-8 bytes from
Résultat string UTF-8 string

windows_1252_to_utf8() public méthode

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
Résultat string UTF-8 encoded string

xml_encoding() public méthode

Detect XML encoding, as per XML 1.0 Appendix F.1
public xml_encoding ( string $data ) : array
$data string XML data
Résultat array Possible encodings