Overview

Packages

  • None
  • SimplePie

Classes

  • SimplePie
  • SimplePie_Author
  • SimplePie_Autoloader
  • SimplePie_Cache
  • SimplePie_Cache_DB
  • SimplePie_Cache_File
  • SimplePie_Cache_Memcache
  • SimplePie_Cache_MySQL
  • SimplePie_Caption
  • SimplePie_Category
  • SimplePie_Content_Type_Sniffer
  • SimplePie_Copyright
  • SimplePie_Core
  • SimplePie_Credit
  • SimplePie_Decode_HTML_Entities
  • SimplePie_Enclosure
  • SimplePie_File
  • SimplePie_gzdecode
  • SimplePie_HTTP_Parser
  • SimplePie_IRI
  • SimplePie_Item
  • SimplePie_Locator
  • SimplePie_Misc
  • SimplePie_Net_IPv6
  • SimplePie_Parse_Date
  • SimplePie_Parser
  • SimplePie_Rating
  • SimplePie_Registry
  • SimplePie_Restriction
  • SimplePie_Sanitize
  • SimplePie_Source
  • SimplePie_XML_Declaration_Parser

Interfaces

  • SimplePie_Cache_Base
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Class SimplePie_Misc

Miscellanous utilities

Package: SimplePie
Located at SimplePie/Misc.php
Methods summary
public static
# time_hms( $seconds )
public static
# absolutize_url( $relative, $base )
public static
# remove_dot_segments( $input )
deprecated public static array
# get_element( string $realname, string $string )

Get a HTML/XML element from a HTML string

Get a HTML/XML element from a HTML string

Deprecated

Use DOMDocument instead (parsing HTML with regex is bad!)

Parameters

$realname
string
Element name (including namespace prefix if applicable)
$string
string
HTML document

Returns

array
public static
# element_implode( $element )
public static
# error( $message, $level, $file, $line )
public static
# fix_protocol( $url, $http = 1 )
public static
# parse_url( $url )
public static
# compress_parse_url( $scheme = '', $authority = '', $path = '', $query = '', $fragment = '' )
public static
# normalize_url( $url )
public static
# percent_encoding_normalization( $match )
public static string
# windows_1252_to_utf8( string $string )

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

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

Parameters

$string
string
Windows-1252 encoded string

Returns

string
UTF-8 encoded string
public static string|boolean
# change_encoding( string $data, string $input, string $output )

Change a string from one encoding to another

Change a string from one encoding to another

Parameters

$data
string
Raw data in $input encoding
$input
string
Encoding of $data
$output
string
Encoding you want

Returns

string|boolean
False if we can't convert it
protected static
# change_encoding_mbstring( $data, $input, $output )
protected static
# change_encoding_iconv( $data, $input, $output )
public static string
# encoding( string $charset )

Normalize an encoding name

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.

Parameters

$charset
string
Character set to standardise

Returns

string
Standardised name
public static
# get_curl_version( )
public static
# is_subclass_of( $class1, $class2 )
public static string
# strip_comments( string $data )

Strip HTML comments

Strip HTML comments

Parameters

$data
string
Data to strip comments from

Returns

string
Comment stripped string
public static
# parse_date( $dt )
deprecated public static string
# entities_decode( string $data )

Decode HTML entities

Decode HTML entities

Deprecated

Use DOMDocument instead

Parameters

$data
string
Input data

Returns

string
Output data
public static string
# uncomment_rfc822( string $string )

Remove RFC822 comments

Remove RFC822 comments

Parameters

$string
string
$data Data to strip comments from

Returns

string
Comment stripped string
public static
# parse_mime( $mime )
public static
# htmlspecialchars_decode( $string, $quote_style )
public static
# atom_03_construct_type( $attribs )
public static
# atom_10_construct_type( $attribs )
public static
# atom_10_content_construct_type( $attribs )
public static
# is_isegment_nz_nc( $string )
public static
# space_seperated_tokens( $string )
public static
# array_unique( $array )
public static string
# codepoint_to_utf8( integer $codepoint )

Converts a unicode codepoint to a UTF-8 character

Converts a unicode codepoint to a UTF-8 character

Parameters

$codepoint
integer
Unicode codepoint

Returns

string
UTF-8 character
public static array
# parse_str( string $str )

Similar to parse_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

$str
string
The input string.

Returns

array
public static array
# xml_encoding( string $data, SimplePie_Registry & $registry )

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

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

Parameters

$data
string
XML data
$registry
SimplePie_Registry
Class registry

Returns

array
Possible encodings

Todo

Add support for EBCDIC
public static
# output_javascript( )
public static
# get_build( )

Get the SimplePie build timestamp

Get the SimplePie build timestamp

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

public static
# debug( & $sp )

Format debugging information

Format debugging information

public static
# silence_errors( $num, $str )
SimplePie Documentation API documentation generated by ApiGen 2.4.0