[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/SimplePie/src/ -> Misc.php (summary)

(no description)

File Size: 2233 lines (70 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Misc:: (42 methods):
  time_hms()
  absolutize_url()
  is_remote_uri()
  get_element()
  element_implode()
  error()
  fix_protocol()
  array_merge_recursive()
  parse_url()
  compress_parse_url()
  normalize_url()
  percent_encoding_normalization()
  windows_1252_to_utf8()
  change_encoding()
  change_encoding_mbstring()
  change_encoding_iconv()
  change_encoding_uconverter()
  encoding()
  get_curl_version()
  strip_comments()
  parse_date()
  entities_decode()
  uncomment_rfc822()
  parse_mime()
  atom_03_construct_type()
  atom_10_construct_type()
  atom_10_content_construct_type()
  is_isegment_nz_nc()
  space_separated_tokens()
  codepoint_to_utf8()
  parse_str()
  xml_encoding()
  output_javascript()
  embed_quicktime()
  embed_flash()
  embed_flv()
  embed_wmedia()
  get_build()
  get_default_useragent()
  debug()
  silence_errors()
  url_remove_credentials()


Class: Misc  - X-Ref

Miscellaneous utilities

time_hms(int $seconds)   X-Ref

return: string

absolutize_url(string $relative, string $base)   X-Ref

return: string|false

is_remote_uri(string $uri)   X-Ref


get_element(string $realname, string $string)   X-Ref
Get a HTML/XML element from a HTML string

return: array<array{tag: string, self_closing: bool, attribs: array<string, array{data: string}>, content?: string}>
param: string $realname Element name (including namespace prefix if applicable)
param: string $string HTML document

element_implode(array $element)   X-Ref

return: string
param: array{tag: string, self_closing: bool, attribs: array<string, array{data: string}>, content: string} $element

error(string $message, int $level, string $file, int $line)   X-Ref

return: string
param: string $message
param: int $level
param: string $file
param: int $line

fix_protocol(string $url, int $http = 1)   X-Ref

return: string

array_merge_recursive(array $array1, array $array2)   X-Ref

return: array<mixed>
param: array<mixed> $array1
param: array<mixed> $array2

parse_url(string $url)   X-Ref

return: array<string, string>

compress_parse_url(string $scheme = '', string $authority = '', string $path = '', string $query = '', ?string $fragment = '')   X-Ref

return: string

normalize_url(string $url)   X-Ref

return: string

percent_encoding_normalization(array $match)   X-Ref

return: string
param: array<int, string> $match

windows_1252_to_utf8(string $string)   X-Ref
Converts a Windows-1252 encoded string to a UTF-8 encoded string

return: string UTF-8 encoded string
param: string $string Windows-1252 encoded string

change_encoding(string $data, string $input, string $output)   X-Ref
Change a string from one encoding to another

return: string|false False if we can't convert it
param: string $data Raw data in $input encoding
param: string $input Encoding of $data
param: string $output Encoding you want

change_encoding_mbstring(string $data, string $input, string $output)   X-Ref

return: string|false

change_encoding_iconv(string $data, string $input, string $output)   X-Ref

return: string|false

change_encoding_uconverter(string $data, string $input, string $output)   X-Ref

return: string|false

encoding(string $charset)   X-Ref
Normalize an encoding name

This is automatically generated by create.php

To generate it, run `php create.php` on the command line, and copy the
output to replace this function.

return: string Standardised name
param: string $charset Character set to standardise

get_curl_version()   X-Ref

return: string

strip_comments(string $data)   X-Ref
Strip HTML comments

return: string Comment stripped string
param: string $data Data to strip comments from

parse_date(string $dt)   X-Ref

return: int|false

entities_decode(string $data)   X-Ref
Decode HTML entities

return: string Output data
param: string $data Input data

uncomment_rfc822(string $string)   X-Ref
Remove RFC822 comments

return: string Comment stripped string
param: string $string Data to strip comments from

parse_mime(string $mime)   X-Ref

return: string

atom_03_construct_type(array $attribs)   X-Ref

return: int-mask-of<SimplePie::CONSTRUCT_*>
param: array<string, array<string, string>> $attribs

atom_10_construct_type(array $attribs)   X-Ref

return: int-mask-of<SimplePie::CONSTRUCT_*>
param: array<string, array<string, string>> $attribs

atom_10_content_construct_type(array $attribs)   X-Ref

return: int-mask-of<SimplePie::CONSTRUCT_*>
param: array<string, array<string, string>> $attribs

is_isegment_nz_nc(string $string)   X-Ref

return: bool

space_separated_tokens(string $string)   X-Ref

return: string[]

codepoint_to_utf8(int $codepoint)   X-Ref
Converts a unicode codepoint to a UTF-8 character

return: string|false UTF-8 character
param: int $codepoint Unicode codepoint

parse_str(string $str)   X-Ref
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

return: array<string, array<string|null>>
param: string $str The input string.

xml_encoding(string $data, \SimplePie\Registry $registry)   X-Ref
Detect XML encoding, as per XML 1.0 Appendix F.1

return: array<string> Possible encodings
param: string $data XML data
param: \SimplePie\Registry $registry Class registry

output_javascript()   X-Ref

return: void

embed_quicktime(type, bgcolor, width, height, link, placeholder, loop)   X-Ref
No description

embed_flash(bgcolor, width, height, link, loop, type)   X-Ref
No description

embed_flv(width, height, link, placeholder, loop, player)   X-Ref
No description

embed_wmedia(width, height, link)   X-Ref
No description

get_build()   X-Ref
Get the SimplePie build timestamp

Uses the git index if it exists, otherwise uses the modification time
of the newest file.

return: int

get_default_useragent()   X-Ref
Get the default user agent string

return: string

debug(SimplePie &$sp)   X-Ref
Format debugging information

return: string

silence_errors(int $num, string $str)   X-Ref

return: bool

url_remove_credentials(string $url)   X-Ref
Sanitize a URL by removing HTTP credentials.

return: string the same URL without HTTP credentials.
param: string $url the URL to sanitize.



Generated : Wed Sep 17 08:20:04 2025 Cross-referenced by PHPXref