本文整理汇总了PHP中Engine_Db_Table::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Engine_Db_Table::__construct方法的具体用法?PHP Engine_Db_Table::__construct怎么用?PHP Engine_Db_Table::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Engine_Db_Table
的用法示例。
在下文中一共展示了Engine_Db_Table::__construct方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($config = array())
{
if (get_class($this) !== 'Core_Model_DbTable_Comments') {
$this->_custom = true;
}
parent::__construct($config);
}
示例2: __construct
public function __construct($config = array())
{
if (!isset($this->_rowClass)) {
$this->_rowClass = Engine_Api::_()->getItemClass($this->getItemType());
}
// @todo stuff
parent::__construct($config);
}
示例3: __construct
public function __construct($itemType, $tableType, $config = array())
{
if (!is_string($itemType) || !is_string($tableType)) {
throw new Fields_Model_Exception('Item type and table type must be strings');
}
$this->_fieldType = $itemType;
$this->_fieldTableType = $tableType;
$config['name'] = $itemType . '_fields_' . $tableType;
parent::__construct($config);
}
示例4: __construct
public function __construct($config = array())
{
parent::__construct($config);
}
示例5: __construct
/**
* Constructor
*
* $config is an instance of Zend_Config or an array of key/value pairs containing configuration options for
* Zend_Session_SaveHandler_DbTable and Zend_Db_Table_Abstract. These are the configuration options for
* Zend_Session_SaveHandler_DbTable:
*
* primaryAssignment => (string|array) Session table primary key value assignment
* (optional; default: 1 => sessionId) You have to assign a value to each primary key of your session table.
* The value of this configuration option is either a string if you have only one primary key or an array if
* you have multiple primary keys. The array consists of numeric keys starting at 1 and string values. There
* are some values which will be replaced by session information:
*
* sessionId => The id of the current session
* sessionName => The name of the current session
* sessionSavePath => The save path of the current session
*
* NOTE: One of your assignments MUST contain 'sessionId' as value!
*
* modifiedColumn => (string) Session table last modification time column
*
* lifetimeColumn => (string) Session table lifetime column
*
* dataColumn => (string) Session table data column
*
* lifetime => (integer) Session lifetime (optional; default: ini_get('session.gc_maxlifetime'))
*
* overrideLifetime => (boolean) Whether or not the lifetime of an existing session should be overridden
* (optional; default: false)
*
* @param Zend_Config|array $config User-provided configuration
* @return void
* @throws Zend_Session_SaveHandler_Exception
*/
public function __construct($config = array())
{
if ($config instanceof Zend_Config) {
$config = $config->toArray();
}
if (is_array($config)) {
foreach ($config as $key => $value) {
do {
switch ($key) {
case self::PRIMARY_ASSIGNMENT:
$this->_primaryAssignment = $value;
break;
case self::MODIFIED_COLUMN:
$this->_modifiedColumn = (string) $value;
break;
case self::LIFETIME_COLUMN:
$this->_lifetimeColumn = (string) $value;
break;
case self::DATA_COLUMN:
$this->_dataColumn = (string) $value;
break;
case self::LIFETIME:
$this->setLifetime($value);
break;
case self::OVERRIDE_LIFETIME:
$this->setOverrideLifetime($value);
break;
default:
// unrecognized options passed to parent::__construct()
break 2;
}
unset($config[$key]);
} while (false);
}
}
parent::__construct($config);
}