Modules/Default/Registry/Model/RegistryValues.php

Show: inherited
Table of Contents

\Conjoon_Modules_Default_Registry_Model_RegistryValues

Package: Conjoon\Model

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

Propertyprotectedstring  $_name= ''registry_values''

The name of the table in the underlying datastore this class represents, without any prefix defined by Conjoon_Db_Table::setTablePrefix

Default value'registry_values'Details
Type
string
Propertyprotectedstring  $_primary= 'array('name', 'user_id')'

The name of the column that denotes the primary key for this table

Default valuearray('name', 'user_id')Details
Type
string
PropertyprotectedString  $_tblPrefix= '""'
staticinherited

Default table prefix.

Inherited from: \Conjoon_Db_Table::$$_tblPrefix
Default value""Details
Type
String
Inherited_from
\Conjoon_Db_Table::$$_tblPrefix  

Methods

methodpublic__construct( string | array $config = array(), \unknown_type $definition = null ) : void
inherited

__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.

Parameters
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
methodpublicgetRegistryValuesForUser( integer $userId ) : array

Returns 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.

Parameters
Name Type Description
$userId integer

the id of the user to fetch the registry values for, or 0 to return system registry values.

Returns
Type Description
array
methodpublicgetTablePrefix( ) : String
staticinherited

Returns the table prefix.

Inherited from: \Conjoon_Db_Table::getTablePrefix()
Returns
Type Description
String
methodpublicsetTablePrefix( String $prefix ) : void
staticinherited

Sets the table prefix.

Inherited from: \Conjoon_Db_Table::setTablePrefix()
Parameters
Name Type Description
$prefix String
methodpublicupdateValueForUser( integer $registryId, string $valueName, mixed $value, string $type, integer $userId ) : boolean

Updates 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.

Parameters
Name Type Description
$registryId integer
$valueName string
$value mixed
$type string
$userId integer
Returns
Type Description
boolean true if the value was updated, otherwise false
Throws
Exception Description
\InvalidArgumentException If any of the passed arguments are invalid
Documentation was generated by DocBlox 0.18.1.