本文整理汇总了PHP中JTable::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP JTable::__construct方法的具体用法?PHP JTable::__construct怎么用?PHP JTable::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JTable
的用法示例。
在下文中一共展示了JTable::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct(&$db = null)
{
if ($db == null) {
$db = JFactory::getDbo();
}
parent::__construct('#__ganalytics_profiles', 'id', $db);
}
示例2: __construct
/**
* Constructor
*
* @param JDatabaseDriver $db Database connector object
*
* @since 1.5
*/
public function __construct(JDatabaseDriver $db)
{
$this->typeAlias = 'com_banners.banner';
parent::__construct('#__banners', 'id', $db);
$this->created = JFactory::getDate()->toSql();
$this->setColumnAlias('published', 'state');
}
示例3:
/**
* Constructor
*
* @param object Database connector object
*/
function __construct(&$db)
{
parent::__construct('#__bt_portfolios', 'id', $db);
if ($this->id == 0) {
$this->extra_fields = self::loadExtraFields($this->extra_fields, 0);
}
}
示例4: __construct
/**
* Constructor
*
* @param JDatabase &$db A database connector object.
*
* @since 11.1
*/
public function __construct(&$db)
{
parent::__construct('#__users', 'id', $db);
// Initialise.
$this->id = 0;
$this->sendEmail = 0;
}
示例5: time
function __construct(&$kunena_db)
{
$fbConfig =& CKunenaConfig::getInstance();
parent::__construct('#__fb_sessions', 'userid', $kunena_db);
$this->lasttime = time() + $fbConfig->board_ofset - KUNENA_SECONDS_IN_YEAR;
$this->currvisit = time() + $fbConfig->board_ofset;
}
示例6: __construct
/**
* Constructor
*
* @access public
* @subpackage Yireo
* @param string $table_name
* @param string $primary_key
* @param JDatabase $db
* @return null
*/
public function __construct($table_name, $primary_key, $db)
{
// Determine the table name
$table_namespace = preg_replace('/^com_/', '', JFactory::getApplication()->input->getCmd('option'));
if (!empty($table_name)) {
if (!strstr($table_name, '#__')) {
$table_name = $table_namespace . '_' . $table_name;
}
} else {
$table_name = $table_namespace;
}
// Call the constructor to finish construction
parent::__construct($table_name, $primary_key, $db);
// Initialize the fields based on an array
$fields = $this->getDatabaseFields();
if (!empty($fields)) {
foreach ($fields as $field) {
if (!empty($this->_defaults[$field])) {
$this->{$field} = $this->_defaults[$field];
} else {
$this->{$field} = null;
}
}
}
}
示例7:
/**
* Constructor
*
* @param database &$db A database connector object.
*
* @return JTableSession
*
* @since 11.1
*/
function __construct(&$db)
{
parent::__construct('#__session', 'session_id', $db);
$this->guest = 1;
$this->username = '';
}
示例8: XmapPlugin
function XmapPlugin(&$_db, $id = NULL)
{
parent::__construct('#__xmap_ext', 'id', $_db);
if ($id) {
$this->load($id);
}
}
示例9: __construct
/**
* Constructor
*
* @param JDatabaseDriver $db A database connector object
*
* @since 11.1
*/
public function __construct(JDatabaseDriver $db)
{
$this->typeAlias = 'com_content.article';
parent::__construct('#__content', 'id', $db);
// Set the alias since the column is called state
$this->setColumnAlias('published', 'state');
}
示例10: __construct
/**
* Constructor
*
* @param JDatabaseDriver &$db Database connector object
*
* @since 1.5
*/
public function __construct(&$db)
{
parent::__construct('#__banners', 'id', $db);
JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_banners.banner'));
$this->created = JFactory::getDate()->toSql();
$this->setColumnAlias('published', 'state');
}
示例11: __construct
public function __construct(&$db = null)
{
parent::__construct('#__dpfields_fields', 'id', $db);
$this->setColumnAlias('published', 'state');
JObserverMapper::addObserverClassToClass('JTableObserverTags', 'DPFieldsTableField', array('typeAlias' => 'com_dpfields.field'));
JObserverMapper::addObserverClassToClass('JTableObserverContenthistory', 'DPFieldsTableField', array('typeAlias' => 'com_dpfields.field'));
}
示例12: iCalEventDetail
/**
* Null Constructor
*/
function iCalEventDetail(&$db)
{
// get default value for multiday from params
$cfg = JEVConfig::getInstance();
$this->_multiday = $cfg->get('multiday', 1);
parent::__construct('#__jevents_vevdetail', 'evdet_id', $db);
}
示例13: __construct
/**
* Constructor
*
* @param JDatabaseDriver &$_db Database connector object
*
* @since 1.5
*/
public function __construct(&$_db)
{
parent::__construct('#__banners', 'id', $_db);
JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_banners.banner'));
$date = JFactory::getDate();
$this->created = $date->toSql();
}
示例14:
/**
* Constructor
*
* @param object Database connector object
* @since 1.0
*/
function __construct(&$db)
{
$tableName = '#__arcna_animals';
parent::__construct($tableName, 'id', $db);
$fields =& $this->getFields();
$this->initDataObject($fields, $this);
}
示例15: __construct
/**
* Constructor
*
* @param object $db Database Object
* @return void
*/
public function __construct(&$db)
{
parent::__construct('#__newsletter_mailinglists', 'id', $db);
//set up the assoc table
$this->_tbl_assoc = '#__newsletter_mailinglist_emails';
$this->_tbl_assoc_key = 'id';
}