Methods summary
public static
|
#
createSession( )
Create an ingo session.
Creates the $ingo session variable with the following entries:
'backend' (array) - The backend configuration to use.
'change' (integer) - The timestamp of the last time the rules were
altered.
'storage' (array) - Used by Ingo_Storage:: for caching data.
'script_categories' (array) - The list of available categories for the
Ingo_Script driver in use.
'script_generate' (boolean) - Is the Ingo_Script::generate() call
available?
Throws
|
public static
string
|
#
flistSelect( string $value = null, string $form = null, string $tagname = 'actionvalue' )
Generates a folder widget.
If an application is available that provides a folderlist method
then a <select> input is created. Otherwise a simple text field
is returned.
Generates a folder widget.
If an application is available that provides a folderlist method
then a <select> input is created. Otherwise a simple text field
is returned.
Parameters
- $value
- The current value for the field.
- $form
- The form name for the newFolderName() call.
- $tagname
- The label for the select tag.
Returns
string The HTML to render the field.
|
public static
string
|
#
validateFolder( Horde_Variables $vars, string $name )
Validates an IMAP mailbox provided by user input.
Validates an IMAP mailbox provided by user input.
Parameters
- $vars
- An variables object.
- $name
- The form name of the folder input.
Returns
string The IMAP mailbox name.
Throws
Horde_Exception
|
public static
string
|
#
getUser( boolean $full = true )
Returns the user whose rules are currently being edited.
Returns the user whose rules are currently being edited.
Parameters
- $full
- Always return the full user name with realm?
Returns
string The current user.
|
public static
string
|
#
getDomain( )
Returns the domain name, if any of the user whose rules are currently
being edited.
Returns the domain name, if any of the user whose rules are currently
being edited.
Returns
string The current user's domain name.
|
public static
boolean
|
#
activateScript( string $script, boolean $deactivate = false, array $additional = array() )
Connects to the backend and uploads the script and sets it active.
Connects to the backend and uploads the script and sets it active.
Parameters
- $script
- The script to set active.
- $deactivate
- <p>If true, notification will identify the
script as deactivated instead of activated.</p>
- $additional
- Any additional scripts that need to uploaded.
Returns
boolean True on success, false on failure.
|
public static
string
|
#
getScript( )
Connects to the backend and returns the currently active script.
Connects to the backend and returns the currently active script.
Returns
string The currently active script.
|
public static
|
#
updateScript( )
Does all the work in updating the script on the server.
Does all the work in updating the script on the server.
|
public static
array
|
#
getBackend( )
Determine the backend to use.
Determine the backend to use.
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.
Returns
array The backend entry.
Throws
|
public static
Ingo_Script
|
#
loadIngoScript( )
Loads a Ingo_Script:: backend and checks for errors.
Loads a Ingo_Script:: backend and checks for errors.
Returns
Throws
|
public static
Ingo_Transport
|
#
getTransport( )
Returns an instance of the configured transport driver.
Returns an instance of the configured transport driver.
Returns
Throws
|
public static
array
|
#
listRulesets( boolean $owneronly = false, integer $permission = Horde_Perms::SHOW )
Returns all rulesets a user has access to, according to several
parameters/permission levels.
Returns all rulesets a user has access to, according to several
parameters/permission levels.
Parameters
- $owneronly
- <p>Only return rulesets that this user owns?
Defaults to false.</p>
- $permission
- The permission to filter rulesets by.
Returns
array The ruleset list.
|
public static
|
|
public static
boolean
|
#
filterEmptyAddress( string $address )
Returns whether an address is empty or only contains a "@".
Helper function for array_filter().
Returns whether an address is empty or only contains a "@".
Helper function for array_filter().
Parameters
- $address
- An email address to test.
Returns
boolean True if the address is not empty.
|
public static
|
#
status( )
Outputs Ingo's status/notification bar.
Outputs Ingo's status/notification bar.
|