本文整理汇总了PHP中Zend_Db_Table_Abstract::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Db_Table_Abstract::__construct方法的具体用法?PHP Zend_Db_Table_Abstract::__construct怎么用?PHP Zend_Db_Table_Abstract::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Db_Table_Abstract
的用法示例。
在下文中一共展示了Zend_Db_Table_Abstract::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($config = null)
{
if (isset($this->_use_adapter)) {
$config = $this->_use_adapter;
}
return parent::__construct($config);
}
示例2: __construct
public function __construct($config = array())
{
parent::__construct($config);
if (!$this->_cache || $this->_cache === TRUE) {
$this->_cache = CachePlugin::init();
}
}
示例3: __construct
public function __construct()
{
$this->_config = Zend_Registry::get('config');
$this->_cache = Zend_Registry::get('cache');
$this->_auth = Zend_Registry::get('auth');
parent::__construct();
}
示例4: __construct
/**
* __construct() - For concrete implementation of Zend_Db_Table
*
* @param string|array $config string can reference a Zend_Registry key for a db adapter
* OR it can reference the name of a table
* @param array|Zend_Db_Table_Definition $definition
*/
public function __construct($config = array(), $definition = null)
{
if ($definition !== null && is_array($definition)) {
$definition = new Zend_Db_Table_Definition($definition);
}
if (is_string($config)) {
if (Zend_Registry::isRegistered($config)) {
trigger_error(__CLASS__ . '::' . __METHOD__ . '(\'registryName\') is not valid usage of Zend_Db_Table, '
. 'try extending Zend_Db_Table_Abstract in your extending classes.',
E_USER_NOTICE
);
$config = array(self::ADAPTER => $config);
} else {
// process this as table with or without a definition
if ($definition instanceof Zend_Db_Table_Definition
&& $definition->hasTableConfig($config)) {
// this will have DEFINITION_CONFIG_NAME & DEFINITION
$config = $definition->getTableConfig($config);
} else {
$config = array(self::NAME => $config);
}
}
}
parent::__construct($config);
}
示例5: __construct
public function __construct()
{
if (isset($this->_use_adapter)) {
$config = Zend_Registry::get($this->_use_adapter);
}
return parent::__construct($config);
}
示例6: __construct
public function __construct($config = NULL)
{
parent::__construct($config);
if (!$this->table_exists()) {
$this->create_table();
}
}
示例7: __construct
/** Construct the objects
* @access public
*/
public function __construct()
{
$this->_config = Zend_Registry::get('config');
$this->_cache = Zend_Registry::get('cache');
$this->_auth = Zend_Registry::get('auth');
$this->_user = new Pas_User_Details();
parent::__construct();
}
示例8: __construct
/**
* Constructor
*
* @param array $config
* @param array $filters
*/
public function __construct(array $config = array(), array $filters = array())
{
parent::__construct($config);
$this->_db = $config['db'];
$this->_table = $config['name'];
$this->_parentField = $config['primary'][0];
$this->_filters = $filters;
}
示例9:
function App_Db_Table_Abstract($config = null)
{
if (isset($this->_use_adapter)) {
$dbAdapters = Zend_Registry::get('dbAdapters');
$config = $dbAdapters[$this->_use_adapter];
}
return parent::__construct($config);
}
示例10:
function Kutu_Core_Orm_CoreDb($config = null)
{
if (isset($this->_use_adapter)) {
$dbAdapters = Zend_Registry::get('dbAdapters');
$config = $dbAdapters[$this->_use_adapter];
}
return parent::__construct($config);
}
示例11: __construct
public function __construct()
{
// Create new PHPExcel object
$this->objPHPExcel = new PHPExcel();
// Set properties
$this->objPHPExcel->getProperties()->setCreator("Resolvo")->setLastModifiedBy("Maarten Balliauw")->setTitle("Office 2007 XLSX Test Document")->setSubject("Office 2007 XLSX Test Document")->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.")->setKeywords("office 2007 openxml php")->setCategory("Test result file");
parent::__construct();
}
示例12: __construct
/**
* __construct
*
* Content constructor.
*
* @param integer $id Content id value.
*/
public function __construct($id = -1)
{
parent::__construct();
$this->_id = $id;
if ($id != -1) {
$this->_data = $this->find((int) $id)->current();
}
// end if
}
示例13: __construct
public function __construct($config = array())
{
$this->_config = Zend_Registry::get('config');
$this->_log = Zend_Registry::get('log');
$this->_prefix = $this->_name . '_';
$this->_db = $this->getAdapter();
//$this->_cache = Zend_Registry::get('cache');
parent::__construct($config);
}
示例14: __construct
public function __construct($config = array())
{
parent::__construct($config);
$this->_cache = Digitalus_Cache_Manager::getInstance();
/**
* @var Digitalus_Db_Cache
*/
$this->cache = new Digitalus_Db_Cache($this);
}
示例15: __construct
/**
* In addition to regular constructor, remove cascading write operations performed by Zend_Db_Table*,
* if the DB already supports DRI (see notes for "db.DRI" in config/config.ini).
*/
public function __construct(array $config = array())
{
parent::__construct($config);
$registry = Zend_Registry::getInstance();
// if DB supports DRI, disable cascading deletes within Zend_Db_Table*
if ($registry['config']->db->DRI) {
unset($this->_referenceMap['Post']['onDelete']);
}
}