Xataface  2.0alpha2
Xataface Application Framework
 All Data Structures Namespaces Files Functions Variables Groups Pages
Public Member Functions | Static Public Member Functions | Data Fields
Dataface_ValuelistTool Class Reference

Public Member Functions

 Dataface_ValuelistTool ()
 _valuelistsIniFilePath ()
 _hasValuelistsIniFile ()
 _loadValuelistsIniFile_old ()
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 38 of file ValuelistTool.php.

_loadValuelistsIniFile_old ( )

Definition at line 119 of file ValuelistTool.php.

_valuelistsIniFilePath ( )

Definition at line 34 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 229 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 278 of file ValuelistTool.php.

Definition at line 27 of file ValuelistTool.php.

static& getInstance ( )
static

Definition at line 169 of file ValuelistTool.php.

& getValuelist (   $name)

Definition at line 177 of file ValuelistTool.php.

hasValuelist (   $name)

Definition at line 193 of file ValuelistTool.php.

& valuelists ( )

Obtains reference to valuelists associative array. Note that this may not include all valuelists defined. Only those valuelists that have already been loaded.

Definition at line 207 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: