Xataface 2.0
Xataface Application Framework
Public Member Functions | Static Public Member Functions | Data Fields
Dataface_ValuelistTool Class Reference

Public Member Functions

 Dataface_ValuelistTool ()
 _valuelistsIniFilePath ()
 _hasValuelistsIniFile ()
 _loadValuelistsIniFile ()
getValuelist ($name)
 hasValuelist ($name)
valuelists ()
 addValueToValuelist (&$table, $valuelistName, $value, $key=null, $checkPerms=false)
asRelationship (&$table, $valuelistName)
 Returns the valuelist as a relationship. This is handy for adding values to it and searching it.

Static Public Member Functions

static & getInstance ()

Data Fields

 $_valuelists = array()

Detailed Description

Definition at line 21 of file ValuelistTool.php.


Member Function Documentation

_hasValuelistsIniFile ( )

Definition at line 37 of file ValuelistTool.php.

_loadValuelistsIniFile ( )

Definition at line 41 of file ValuelistTool.php.

_valuelistsIniFilePath ( )

Definition at line 33 of file ValuelistTool.php.

addValueToValuelist ( &$  table,
valuelistName,
value,
key = null,
checkPerms = false 
)

Adds a value to a valuelist. This only works for valuelists that are pulled from the database.

Parameters:
Dataface_TableThe table to add the valuelist to.
string$valuelistNameThe name of the valuelist.
string$valueThe value to add.
string$keyThe key to add.
boolean$checkPermsIf true, this will first check permissions before adding the value.
Returns:
mixed May return a permission denied error if there is insufficient permissions.

Definition at line 148 of file ValuelistTool.php.

& asRelationship ( &$  table,
valuelistName 
)

Returns the valuelist as a relationship. This is handy for adding values to it and searching it.

Parameters:
Dataface_Table&$tableThe table where the valuelist is defined.
string$valuelistNameThe name of the valuelist.
Returns:
Dataface_Relationship A wrapper relationship for the valuelist.
PEAR_Error If there is a problem generating the relationship.

Definition at line 197 of file ValuelistTool.php.

Definition at line 26 of file ValuelistTool.php.

static& getInstance ( ) [static]

Definition at line 91 of file ValuelistTool.php.

& getValuelist ( name)

Definition at line 99 of file ValuelistTool.php.

hasValuelist ( name)

Definition at line 114 of file ValuelistTool.php.

& valuelists ( )

Obtains reference to valuelists associative array.

Definition at line 126 of file ValuelistTool.php.


Field Documentation

$_valuelists = array()

Definition at line 24 of file ValuelistTool.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations