| | |
| | | return $time; |
| | | } |
| | | |
| | | function absolutize_url($relative, $base) |
| | | static function absolutize_url($relative, $base) |
| | | { |
| | | $iri = SimplePie_IRI::absolutize(new SimplePie_IRI($base), $relative); |
| | | return $iri->get_iri(); |
| | |
| | | return $output . $input; |
| | | } |
| | | |
| | | function get_element($realname, $string) |
| | | static function get_element($realname, $string) |
| | | { |
| | | $return = array(); |
| | | $name = preg_quote($realname, '/'); |
| | |
| | | die('Cached file for ' . $identifier_url . ' cannot be found.'); |
| | | } |
| | | |
| | | function fix_protocol($url, $http = 1) |
| | | public static function fix_protocol($url, $http = 1) |
| | | { |
| | | $url = SimplePie_Misc::normalize_url($url); |
| | | $parsed = SimplePie_Misc::parse_url($url); |
| | |
| | | } |
| | | } |
| | | |
| | | function parse_url($url) |
| | | public static function parse_url($url) |
| | | { |
| | | $iri = new SimplePie_IRI($url); |
| | | return array( |
| | |
| | | return $iri->get_iri(); |
| | | } |
| | | |
| | | function normalize_url($url) |
| | | public static function normalize_url($url) |
| | | { |
| | | $iri = new SimplePie_IRI($url); |
| | | return $iri->get_iri(); |
| | |
| | | return strtr($string, $convert_table); |
| | | } |
| | | |
| | | function change_encoding($data, $input, $output) |
| | | public static function change_encoding($data, $input, $output) |
| | | { |
| | | $input = SimplePie_Misc::encoding($input); |
| | | $output = SimplePie_Misc::encoding($output); |
| | |
| | | } |
| | | } |
| | | |
| | | function encoding($charset) |
| | | public static function encoding($charset) |
| | | { |
| | | // Normalization from UTS #22 |
| | | switch (strtolower(preg_replace('/(?:[^a-zA-Z0-9]+|([^0-9])0+)/', '\1', $charset))) |
| | |
| | | } |
| | | } |
| | | |
| | | function get_curl_version() |
| | | public static function get_curl_version() |
| | | { |
| | | if (is_array($curl = curl_version())) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | function atom_10_construct_type($attribs) |
| | | static function atom_10_construct_type($attribs) |
| | | { |
| | | if (isset($attribs['']['type'])) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | function is_isegment_nz_nc($string) |
| | | static function is_isegment_nz_nc($string) |
| | | { |
| | | return (bool) preg_match('/^([A-Za-z0-9\-._~\x{A0}-\x{D7FF}\x{F900}-\x{FDCF}\x{FDF0}-\x{FFEF}\x{10000}-\x{1FFFD}\x{20000}-\x{2FFFD}\x{30000}-\x{3FFFD}\x{40000}-\x{4FFFD}\x{50000}-\x{5FFFD}\x{60000}-\x{6FFFD}\x{70000}-\x{7FFFD}\x{80000}-\x{8FFFD}\x{90000}-\x{9FFFD}\x{A0000}-\x{AFFFD}\x{B0000}-\x{BFFFD}\x{C0000}-\x{CFFFD}\x{D0000}-\x{DFFFD}\x{E1000}-\x{EFFFD}!$&\'()*+,;=@]|(%[0-9ABCDEF]{2}))+$/u', $string); |
| | | } |
| | |
| | | * @param string $data XML data |
| | | * @return array Possible encodings |
| | | */ |
| | | function xml_encoding($data) |
| | | public static function xml_encoding($data) |
| | | { |
| | | // UTF-32 Big Endian BOM |
| | | if (substr($data, 0, 4) === "\x00\x00\xFE\xFF") |
| | |
| | | * @param string $relative Relative IRI |
| | | * @return SimplePie_IRI |
| | | */ |
| | | function absolutize($base, $relative) |
| | | static function absolutize($base, $relative) |
| | | { |
| | | $relative = (string) $relative; |
| | | if ($relative !== '') |
| | |
| | | } |
| | | else |
| | | { |
| | | $this->query = $this->replace_invalid_with_pct_encoding($query, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~!$\'()*+,;:@/?'); |
| | | $this->query = $this->replace_invalid_with_pct_encoding($query, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~!$\'()*+,;:@/?&='); |
| | | } |
| | | $this->valid[__FUNCTION__] = true; |
| | | return true; |