Modules/Default/Registry/Model/RegistryValues.php
\Conjoon_Modules_Default_Registry_Model_RegistryValues
Table data gateway. Models the table <tt>registry_values</tt>.
- Parent(s)
- \Conjoon_Db_Table < \Zend_Db_Table
- Author
- Thorsten Suckow-Homberg
- Category
- Model
- Uses
- \Conjoon_Db_Table
Properties

string
$_name= ''registry_values''
The name of the table in the underlying datastore this class represents, without any prefix defined by Conjoon_Db_Table::setTablePrefix
'registry_values'Details- Type
- string

string
$_primary= 'array('name', 'user_id')'
The name of the column that denotes the primary key for this table
array('name', 'user_id')Details- Type
- string

String
$_tblPrefix= '""'
""Details- Type
- String
- Inherited_from
- \Conjoon_Db_Table::$$_tblPrefix
Methods

__construct(
string | array $config
=
array(), \unknown_type $definition
=
null
)
:
void__construct() - For concrete implementation of Conjoon_Db_Table
Inherited from: \Conjoon_Db_Table::__construct()This constructor automatically prepends the prefix as defined using setTablePrefix() to this table's name.
| Name | Type | Description |
|---|---|---|
| $config | string | array | string can reference a Zend_Registry key for a db adapter OR it can refernece the name of a table |
| $definition | \unknown_type |

getRegistryValuesForUser(
integer $userId
)
:
arrayReturns the registry values for a specific user. Registry values with user-id "0" are treated as system settings and will not be returned if another entry exists with the same name, but user-id set to $userId.
The array will be indexed be the values "registry_id" key.
| Name | Type | Description |
|---|---|---|
| $userId | integer | the id of the user to fetch the registry values for, or 0 to return system registry values. |
| Type | Description |
|---|---|
| array |

updateValueForUser(
integer $registryId, string $valueName, mixed $value, string $type, integer $userId
)
:
booleanUpdates the given value name for the specified registry id for tje specified user with the specified value.
Note: no casting for values will happen for the specified $type param, so make sure casting happened before.
| Name | Type | Description |
|---|---|---|
| $registryId | integer | |
| $valueName | string | |
| $value | mixed | |
| $type | string | |
| $userId | integer |
| Type | Description |
|---|---|
| boolean | true if the value was updated, otherwise false |
| Exception | Description |
|---|---|
| \InvalidArgumentException | If any of the passed arguments are invalid |