[ Index ]

PHP Cross Reference of Joomla 1.5.26 DE

title

Body

[close]

/libraries/openid/Auth/ -> OpenID.php (summary)

This is the PHP OpenID library by JanRain, Inc. This module contains core utility functionality used by the library.  See Consumer.php and Server.php for the consumer and server implementations.

Author: JanRain, Inc. <openid@janrain.com>
Copyright: 2005-2008 Janrain, Inc.
License: http://www.apache.org/licenses/LICENSE-2.0 Apache
File Size: 555 lines (15 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Auth_OpenID:: (19 methods):
  isFailure()
  getQuery()
  params_from_string()
  ensureDir()
  addPrefix()
  arrayGet()
  parse_str()
  httpBuildQuery()
  appendArgs()
  urlunparse()
  normalizeUrl()
  intval()
  bytes()
  toBytes()
  urldefrag()
  filter()
  update()
  log()
  autoSubmitHTML()


Class: Auth_OpenID  - X-Ref

The OpenID utility function class.

isFailure($thing)   X-Ref
Return true if $thing is an Auth_OpenID_FailureResponse object;
false if not.


getQuery($query_str=null)   X-Ref
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.


params_from_string($str)   X-Ref
No description

ensureDir($dir_name)   X-Ref
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.


addPrefix($values, $prefix)   X-Ref
Adds a string prefix to all values of an array.  Returns a new
array containing the prefixed values.


arrayGet($arr, $key, $fallback = null)   X-Ref
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.


parse_str($query)   X-Ref
Replacement for PHP's broken parse_str.


httpBuildQuery($data)   X-Ref
Implements the PHP 5 'http_build_query' functionality.

param: array $data Either an array key/value pairs or an array
return: string $result The result of url-encoding the key/value

appendArgs($url, $args)   X-Ref
"Appends" query arguments onto a URL.  The URL may or may not
already have arguments (following a question mark).

param: string $url A URL, which may or may not already have
param: array $args Either an array key/value pairs or an array of
return: string $url The original URL with the new parameters added.

urlunparse($scheme, $host, $port = null, $path = '/',$query = '', $fragment = '')   X-Ref
Implements python's urlunparse, which is not available in PHP.
Given the specified components of a URL, this function rebuilds
and returns the URL.

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

normalizeUrl($url)   X-Ref
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.

param: string $url The URL to be normalized.
return: mixed $new_url The URL after normalization, or null if

intval($value)   X-Ref
Replacement (wrapper) for PHP's intval() because it's broken.


bytes($str)   X-Ref
Count the number of bytes in a string independently of
multibyte support conditions.

param: string $str The string of bytes to count.
return: int The number of bytes in $str.

toBytes($str)   X-Ref
Get the bytes in a string independently of multibyte support
conditions.


urldefrag($url)   X-Ref
No description

filter($callback, &$sequence)   X-Ref
No description

update(&$dest, &$src)   X-Ref
No description

log($format_string)   X-Ref
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.

param: string $format_string The sprintf format for the message

autoSubmitHTML($form, $title="OpenId transaction in progress")   X-Ref
No description



Generated: Wed Mar 28 15:54:07 2012 Cross-referenced by PHPXref 0.7.1