本文整理汇总了PHP中Zend_Db_Table_Abstract::init方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Db_Table_Abstract::init方法的具体用法?PHP Zend_Db_Table_Abstract::init怎么用?PHP Zend_Db_Table_Abstract::init使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Db_Table_Abstract
的用法示例。
在下文中一共展示了Zend_Db_Table_Abstract::init方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init
function init()
{
parent::init();
// NB! если свойство должно быть не в data, то прописывать его индивидуально!
$this->_data = array('ItemCountPerPage' => 10, 'isPaginator' => true, 'isReturnPaginator' => false, 'generalWhere' => '', 'conditionWhere' => false, 'isStoredRows' => false);
if ($this->_alias === null) {
$this->imgs['folder'] = $this->_name;
} else {
$this->imgs['folder'] = $this->_alias;
}
#$conf = Zend_Registry::get('conf');
#d($conf->logger->sql);
}
示例2: init
public function init()
{
parent::init();
}
示例3: init
public function init()
{
parent::init();
if (isset($this->_multilang_field) || isset($this->_multilang_type)) {
$this->_current_lang = $reg = Zend_Registry::isRegistered('Zkernel_Multilang') ? Zend_Registry::get('Zkernel_Multilang') : '';
if ($reg) {
$changed = false;
$cols = $this->info('metadata');
switch ($this->_multilang_type) {
case 1:
if (!array_key_exists('lang', $cols)) {
$changed = true;
$this->getAdapter()->query('ALTER TABLE `' . $this->_name . '` ADD `lang` int(11)');
$this->getAdapter()->query('ALTER TABLE `' . $this->_name . '` ADD INDEX `i_lang` (`lang`)');
}
break;
default:
$m = new Default_Model_Lang();
$ids = implode('|', $reg->_ids);
$ml = implode('|', $this->_multilang_field);
foreach ($this->_multilang_field as $k => $el) {
if (!array_key_exists('ml_' . $el . '_' . $reg->id, $cols)) {
$changed = true;
$this->getAdapter()->query('ALTER TABLE `' . $this->_name . '` ADD `ml_' . $el . '_' . $reg->id . '` ' . $cols[$el]['DATA_TYPE'] . ($cols[$el]['LENGTH'] ? '(' . $cols[$el]['LENGTH'] . ')' : '') . ($cols[$el]['DEFAULT'] ? ' DEFAULT ' . $cols[$el]['DEFAULT'] : ''));
}
}
/*foreach ($cols as $k => $el) {
if (preg_match('/^ml\_'.$el.'\_(\d+)$/i', $k) && !preg_match('/^ml\_('.implode('|', $this->_multilang_field).')\_('.implode('|', $ids).')+$/i')) {
$changed = true;
$this->getAdapter()->query('ALTER TABLE `'.$this->_name.'` DROP `'.$k.'`');
}
}*/
break;
}
if ($changed) {
$cache = $this->getMetadataCache();
if ($cache) {
$cache->clean();
}
}
}
}
}
示例4: init
public function init()
{
$this->_iniConfig = new Zend_Config_Ini(APPLICATION_PATH . '/configs/application.ini', APPLICATION_ENV);
parent::init();
}
示例5: init
public function init()
{
parent::init();
$this->logger = Zend_Registry::get('logger')->ensureStream('system');
}
示例6: init
public function init()
{
return parent::init();
}