Auth_OpenID Class Reference

List of all members.


Detailed Description

The OpenID utility function class.

private

Definition at line 112 of file OpenID.php.


Public Member Functions

 isFailure ($thing)
 getQuery ($query_str=null)
 params_from_string ($str)
 ensureDir ($dir_name)
 addPrefix ($values, $prefix)
 arrayGet ($arr, $key, $fallback=null)
 parse_str ($query)
 httpBuildQuery ($data)
 appendArgs ($url, $args)
 urlunparse ($scheme, $host, $port=null, $path= '/', $query= '', $fragment= '')
 normalizeUrl ($url)
 intval ($value)
 bytes ($str)
 toBytes ($str)
 urldefrag ($url)
 filter ($callback, &$sequence)
 update (&$dest, &$src)
 log ($format_string)
 autoSubmitHTML ($form, $title="OpenId transaction in progress")

Member Function Documentation

Auth_OpenID.isFailure ( thing  ) 

Return true if $thing is an Auth_OpenID_FailureResponse object; false if not.

private

Definition at line 120 of file OpenID.php.

Auth_OpenID.getQuery ( query_str = null  ) 

Gets the query data from the server environment based on the request method used. If GET was used, this looks at $_SERVER['QUERY_STRING'] directly. If POST was used, this fetches data from the special php://input file stream.

Returns an associative array of the query arguments.

Skips invalid key/value pairs (i.e. keys with no '=value' portion).

Returns an empty array if neither GET nor POST was used, or if POST was used but php://input cannot be opened.

private

Definition at line 141 of file OpenID.php.

Auth_OpenID.params_from_string ( str  ) 

Definition at line 177 of file OpenID.php.

Auth_OpenID.ensureDir ( dir_name  ) 

Create dir_name as a directory if it does not exist. If it exists, make sure that it is, in fact, a directory. Returns true if the operation succeeded; false if not.

private

Definition at line 203 of file OpenID.php.

Auth_OpenID.addPrefix ( values,
prefix 
)

Adds a string prefix to all values of an array. Returns a new array containing the prefixed values.

private

Definition at line 225 of file OpenID.php.

Auth_OpenID.arrayGet ( arr,
key,
fallback = null 
)

Convenience function for getting array values. Given an array $arr and a key $key, get the corresponding value from the array or return $default if the key is absent.

private

Definition at line 241 of file OpenID.php.

Auth_OpenID.parse_str ( query  ) 

Replacement for PHP's broken parse_str.

Definition at line 261 of file OpenID.php.

Auth_OpenID.httpBuildQuery ( data  ) 

Implements the PHP 5 'http_build_query' functionality.

private

Parameters:
array $data Either an array key/value pairs or an array of arrays, each of which holding two values: a key and a value, sequentially.
Returns:
string $result The result of url-encoding the key/value pairs from $data into a URL query string (e.g. "username=bob&id=56").

Definition at line 295 of file OpenID.php.

Auth_OpenID.appendArgs ( url,
args 
)

"Appends" query arguments onto a URL. The URL may or may not already have arguments (following a question mark).

private

Parameters:
string $url A URL, which may or may not already have arguments.
array $args Either an array key/value pairs or an array of arrays, each of which holding two values: a key and a value, sequentially. If $args is an ordinary key/value array, the parameters will be added to the URL in sorted alphabetical order; if $args is an array of arrays, their order will be preserved.
Returns:
string $url The original URL with the new parameters added.

Definition at line 323 of file OpenID.php.

Auth_OpenID.urlunparse ( scheme,
host,
port = null,
path = '/',
query = '',
fragment = '' 
)

Implements python's urlunparse, which is not available in PHP. Given the specified components of a URL, this function rebuilds and returns the URL.

private

Parameters:
string $scheme The scheme (e.g. 'http'). Defaults to 'http'.
string $host The host. Required.
string $port The port.
string $path The path.
string $query The query.
string $fragment The fragment.
Returns:
string $url The URL resulting from assembling the specified components.

Definition at line 367 of file OpenID.php.

Auth_OpenID.normalizeUrl ( url  ) 

Given a URL, this "normalizes" it by adding a trailing slash and / or a leading http:// scheme where necessary. Returns null if the original URL is malformed and cannot be normalized.

private

Parameters:
string $url The URL to be normalized.
Returns:
mixed $new_url The URL after normalization, or null if $url was malformed.

Definition at line 412 of file OpenID.php.

Auth_OpenID.intval ( value  ) 

Replacement (wrapper) for PHP's intval() because it's broken.

private

Definition at line 443 of file OpenID.php.

Auth_OpenID.bytes ( str  ) 

Count the number of bytes in a string independently of multibyte support conditions.

Parameters:
string $str The string of bytes to count.
Returns:
int The number of bytes in $str.

Definition at line 461 of file OpenID.php.

Auth_OpenID.toBytes ( str  ) 

Get the bytes in a string independently of multibyte support conditions.

Definition at line 470 of file OpenID.php.

Auth_OpenID.urldefrag ( url  ) 

Definition at line 486 of file OpenID.php.

Auth_OpenID.filter ( callback,
&$  sequence 
)

Definition at line 497 of file OpenID.php.

Auth_OpenID.update ( &$  dest,
&$  src 
)

Definition at line 510 of file OpenID.php.

Auth_OpenID.log ( format_string  ) 

Wrap PHP's standard error_log functionality. Use this to perform all logging. It will interpolate any additional arguments into the format string before logging.

Parameters:
string $format_string The sprintf format for the message

Definition at line 524 of file OpenID.php.

Auth_OpenID.autoSubmitHTML ( form,
title = "OpenId transaction in progress" 
)

Definition at line 531 of file OpenID.php.


The documentation for this class was generated from the following file:

Generated on Thu Feb 19 15:02:46 2009 for OXID eShop CE by  doxygen 1.5.5