本文整理匯總了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();
}