本文整理汇总了PHP中Zend_Db_Table_Abstract::setOptions方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Db_Table_Abstract::setOptions方法的具体用法?PHP Zend_Db_Table_Abstract::setOptions怎么用?PHP Zend_Db_Table_Abstract::setOptions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Db_Table_Abstract
的用法示例。
在下文中一共展示了Zend_Db_Table_Abstract::setOptions方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setOptions
/**
* @param array $options
* @return ZFExt_Db_Table
*/
public function setOptions(array $options)
{
if (isset($options[self::CACHE])) {
$this->setCache($options[self::CACHE]);
}
return parent::setOptions($options);
}
示例2: setOptions
/**
* setOptions()
*
* @param array $options
* @return Axis_Db_Table_Abstract
*/
public function setOptions(array $options)
{
//@todo now never used, need create Axis_Db factory with
if (isset($options[self::PREFIX])) {
$this->_prefix = $options[self::PREFIX];
}
if (isset($options[self::SELECT_CLASS])) {
$this->setSelectClass($options[self::SELECT_CLASS]);
}
return parent::setOptions($options);
}
示例3: setOptions
/**
* Override Zend_Db_Table_Abstract setOptions method to allow setting of
* our custom configuration options. At the moment, this just includes
* "defaultOrder", the default order spec array for this table.
*
* @param array $options
*/
public function setOptions(array $options)
{
parent::setOptions($options);
foreach ($options as $key => $val) {
switch ($key) {
case self::DEFAULT_ORDER:
$this->_defaultOrder = (array) $val;
break;
default:
// ignore
break;
}
}
}
示例4: setOptions
/**
* Expects an array of adapter options. The following array key will be handled:<br>
* id - Name of the field which holds the primary key. Data type: Integer<br>
* parent - Name of the field which holds the ID of the parent menu element. Data type: Integer<br>
* uri - Name of the field which holds an URI. Data type: String<br>
* label - Name of the field which holds the name of the menu entry. Data type: String<br>
* onClick - Name of the field which holds the onClick Action. Data type: String<br>
* style - Name of the field which holds the name of the style. Data type: String<br>
* class - Name of the field which holds the css class name. Data type: String<br>
* position - Name of the field which holds the position of the menu entry Data type: Integer<br>
* active - Name of the field which holds the active flag.Data type: Integer<br>
*
* @param array $options
* @return Enlight_Components_Menu_Adapter_DbTable
*/
public function setOptions(array $options)
{
foreach ($options as $key => $option) {
if ($key == 'order') {
$this->_order = $option;
} elseif (substr($key, -6) == 'Column') {
$this->_columns[substr($key, 0, -6)] = (string) $option;
}
}
return parent::setOptions($options);
}