$hordeInit
$hordeInit : boolean
A flag that is set once the basic horde application has been minimally configured.
A test replacement for Horde_Registry.
convertUsername(string $userId, boolean $toHorde) : string
Converts an authentication username to a unique Horde username.
string | $userId | The username to convert. |
boolean | $toHorde | If true, convert to a Horde username. If false, convert to the auth username. |
The converted username.
getAuth(string $format = null) : mixed
Returns the currently logged in user, if there is one.
string | $format | The return format, defaults to the unique Horde ID. Alternative formats: bare - Horde ID without any domain information. EXAMPLE: foo@example.com would be returned as 'foo'. domain: Domain of the Horde ID. EXAMPLE: foo@example.com would be returned as 'example.com'. original: The username used to originally login to Horde. |
The user ID or false if no user is logged in.
isAdmin(array $options = array()) : boolean
Is a user an administrator?
array | $options | Options: 'permission' - (string) Allow users with this permission admin access in the current context. 'permlevel' - (integer) The level of permissions to check for. Defaults to Horde_Perms::EDIT. 'user' - (string) The user to check. Defaults to self::getAuth(). |
Whether or not this is an admin user.
remoteHost() : object
Returns information about the remote host.
An object with the following properties:
- addr: (string) Remote IP address. - host: (string) Remote hostname (if resolvable; otherwise, this value is identical to 'addr'). - proxy: (boolean) True if this user is connecting through a proxy.
setConfigFile(object $loadconfig, string $conf_file, mixed $vars = null, string $app = null)
Assigns a (pre-configured) Loadconfig object.
This object will be returned by loadConfig(), if the same parameters are used.
object | $loadconfig | Configuration object. |
string | $conf_file | Configuration file name. |
mixed | $vars | List of config variables to load. |
string | $app | Application. |
loadConfigFile(string $conf_file, mixed $vars = null, string $app = null) : \Horde_Test_Stub_Registry_Loadconfig
Load a configuration file from a Horde application's config directory.
This call is cached (a config file is only loaded once, regardless of the $vars value).
string | $conf_file | Configuration file name. |
mixed | $vars | List of config variables to load. |
string | $app | Application. |
The config object.
get(string $parameter, string $app = null) : string
Return the requested configuration parameter for the specified application. If no application is specified, the value of the current application is used. However, if the parameter is not present for that application, the Horde-wide value is used instead.
If that is not present, we return null.
string | $parameter | The configuration value to retrieve. |
string | $app | The application to get the value for. |
The requested parameter, or null if it is not set.