Class Ingo

Description

Ingo base class.

$Horde: ingo/lib/Ingo.php,v 1.69.6.23 2008/12/15 02:33:08 chuck Exp $

See the enclosed file LICENSE for license information (ASL). If you did not receive this file, see http://www.horde.org/licenses/asl.php.

Located in /lib/Ingo.php (line 20)


	
			
Method Summary
 boolean activateScript (string $script, [boolean $deactivate = false])
 boolean createFolder (string $folder)
 string flistSelect ([string $value = null], [string $form = null], [string $tagname = 'actionvalue'], [string $onchange = null])
 array getBackend ()
 string getDomain ()
 void getMenu ([ $returnType = 'object'])
 string getScript ()
 string getUser ([boolean $full = true])
 mixed hasPermission (string $permission, [ $mask = null])
 array listRulesets ([boolean $owneronly = false], [integer $permission = PERMS_SHOW])
 void updateScript ()
 boolean _filterEmptyAddress (string $address)
Methods
activateScript (line 151)

Connects to the backend and uploads the script and sets it active.

  • return: True on success, false on failure.
boolean activateScript (string $script, [boolean $deactivate = false])
  • string $script: The script to set active.
  • boolean $deactivate: If true, notification will identify the script as deactivated instead of activated.
createFolder (line 93)

Creates a new IMAP folder via an api call.

  • return: True on success, false if not created, PEAR_Error on failure.
boolean createFolder (string $folder)
  • string $folder: The name of the folder to create.
flistSelect (line 35)

Generates a folder widget.

If an application is available that provides a folderlist method then a <select> input is created else a simple text field is returned.

  • return: The HTML to render the field.
string flistSelect ([string $value = null], [string $form = null], [string $tagname = 'actionvalue'], [string $onchange = null])
  • string $value: The current value for the field.
  • string $form: The form name for the newFolderName() call.
  • string $tagname: The label for the select tag.
  • string $onchange: Javascript code to execute onchange.
getBackend (line 215)

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.

  • return: The backend entry. Calls Horde::fatal() on error.
array getBackend ()
getDomain (line 131)

Returns the domain name, if any of the user whose rules are currently being edited.

  • return: The current user's domain name.
string getDomain ()
getDriver (line 287)

Returns an instance of the configured driver.

  • return: The configured driver.
Ingo_Driver getDriver ()
getMenu (line 394)

Build Ingo's list of menu items.

void getMenu ([ $returnType = 'object'])
  • $returnType
getScript (line 179)

Connects to the backend and returns the currently active script.

  • return: The currently active script.
string getScript ()
getUser (line 111)

Returns the user whose rules are currently being edited.

  • return: The current user.
string getUser ([boolean $full = true])
  • boolean $full: Always return the full user name with realm?
hasPermission (line 342)

Returns the specified permission for the current user.

  • return: The value of the specified permission.
  • since: Ingo 1.1
mixed hasPermission (string $permission, [ $mask = null])
  • string $permission: A permission, either 'allow_rules' or 'max_rules'.
  • $mask
listRulesets (line 321)

Returns all rulesets a user has access to, according to several parameters/permission levels.

  • return: The ruleset list.
  • since: Ingo 2.1
array listRulesets ([boolean $owneronly = false], [integer $permission = PERMS_SHOW])
  • boolean $owneronly: Only return rulesets that this user owns? Defaults to false.
  • integer $permission: The permission to filter rulesets by.
loadIngoScript (line 268)

Loads a Ingo_Script:: backend and checks for errors.

  • return: Script object on success, PEAR_Error on failure.
Ingo_Script loadIngoScript ()
updateScript (line 188)

Does all the work in updating the script on the server.

void updateScript ()
_filterEmptyAddress (line 385)

Returns whether an address is empty or only contains a "@".

Helper function for array_filter().

  • return: True if the address is not empty.
boolean _filterEmptyAddress (string $address)
  • string $address: An email address to test.

Documentation generated on Sun, 30 Jan 2011 05:29:26 +0000 by phpDocumentor 1.4.3