PHP Class Sam, horde

Copyright 2002-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (GPL). If you did not receive this file, see http://www.horde.org/licenses/gpl.
Author: Chris Bowlby ([email protected])
Author: Max Kalika ([email protected])
Author: Jan Schneider ([email protected])
Mostra file Open project: horde/horde Class Usage Examples

Public Methods

Method Description
getAttributes ( ) : array Find a list of configured attributes.
getPreferredBackend ( ) : array Determines the backend to use.
infoAttribute ( $type = '' ) : boolean Find out whether the given attribute type is informational only.
mapUser ( string | boolean $hordeauth ) : string Converts the current user's name, optionally removing the domain part or applying any configured hooks.

Method Details

getAttributes() public static method

Load the attributes configuration file or uses an already-loaded cached copy. If loading for the first time, cache it for later use.
public static getAttributes ( ) : array
return array The attributes list.

getPreferredBackend() public static method

This decision is based on the global 'SERVER_NAME' and 'HTTP_HOST' server variables and the contents of the 'preferred' either field in the backend's definition. The 'preferred' field may take a single value or an array of multiple values.
public static getPreferredBackend ( ) : array
return array The backend entry.

infoAttribute() public static method

Find out whether the given attribute type is informational only.
public static infoAttribute ( $type = '' ) : boolean
return boolean Returns true if the given type is known to be informational only.

mapUser() public static method

Converts the current user's name, optionally removing the domain part or applying any configured hooks.
public static mapUser ( string | boolean $hordeauth ) : string
$hordeauth string | boolean Defines how to use the authenticated Horde username. If set to 'full', will initialize the username to contain the @realm part. Otherwise, the username will initialize as a simple login.
return string The converted username.