本文整理汇总了PHP中KDatabaseTableDefault::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP KDatabaseTableDefault::__construct方法的具体用法?PHP KDatabaseTableDefault::__construct怎么用?PHP KDatabaseTableDefault::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KDatabaseTableDefault
的用法示例。
在下文中一共展示了KDatabaseTableDefault::__construct方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* @param KConfig $config
*/
public function __construct(KConfig $config)
{
parent::__construct($config);
if (empty($config->relation_table)) {
throw new KDatabaseTableException('Relation table cannot be empty');
}
$this->setRelationTable($config->relation_table);
}
示例2: __construct
public function __construct(KConfig $config)
{
parent::__construct($config);
//Make sure the email and username fields are unique
$this->getColumn('email')->unique = true;
$this->getColumn('username')->unique = true;
$this->getColumn('users_group_id')->default = 0;
$this->getColumn('enabled')->default = 1;
}
示例3: __construct
public function __construct(KConfig $config)
{
$config->append(array('filters' => array('params' => 'json'), 'behaviors' => array('orderable')));
parent::__construct($config);
$this->_xml_path = $config->xml_path;
foreach ($this->getColumns() as $field) {
if ($field->name == 'default') {
$field->unique = 1;
break;
}
}
}
示例4: __construct
/**
* Constructor
*
* @param object An optional KConfig object with configuration options
*/
public function __construct(KConfig $config)
{
$config->name = 'ninjaboard_forums';
$nestable = KFactory::tmp('admin::com.ninja.database.behavior.nestable');
$orderable = KFactory::tmp('admin::com.ninjaboard.database.behavior.orderable');
//$configurable = KFactory::tmp('admin::com.ninjaboard.behavior.configurable');
$config->behaviors = array($orderable, $nestable);
$config->filters = array('params' => 'json');
parent::__construct($config);
//@TODO change the default value to '/' in the table schema later.
$fields = $this->getColumns();
$fields['path']->default = '/';
}
示例5: __construct
public function __construct(KConfig $config)
{
parent::__construct($config);
// Set the table for multilingual purposes.
$lang_tag = JFactory::getLanguage()->getTag();
$parts = explode('-', $lang_tag);
$lang = $parts[0];
$base = 'featured_nodes';
$table = ($lang != 'en' ? $lang . '_' : '') . $base;
try {
$this->getDatabase()->getTableSchema($table);
} catch (Exception $e) {
// The table doesn't exist, so reset it.
$table = $base;
}
$this->_base = $table;
$this->_name = $table;
}
示例6: __construct
/**
* Constructor
*
* @param object An optional KConfig object with configuration options
*/
public function __construct(KConfig $config)
{
$config->append(array('filters' => array('text' => 'raw'), 'behaviors' => array('creatable')));
parent::__construct($config);
}
示例7: __construct
/**
* Constructor
*
* @param object An optional KConfig object with configuration options
*/
public function __construct(KConfig $config = null)
{
$config->append(array('filters' => array('params' => 'json'), 'behaviors' => array('hittable')));
parent::__construct($config);
}
示例8: __construct
public function __construct(KConfig $config)
{
parent::__construct($config);
$this->getColumn('email')->unique = true;
$this->getColumn('username')->unique = true;
}
示例9: __construct
/**
* Constructor
*
* @param object An optional KConfig object with configuration options
*/
public function __construct(KConfig $config)
{
$config->append(array('name' => 'ninjaboard_log_topic_reads', 'behaviors' => array('creatable')));
parent::__construct($config);
}
示例10: __construct
/**
* Constructor
*
* @param object An optional KConfig object with configuration options
*/
public function __construct(KConfig $options)
{
$options->name = 'ninjaboard_joomla_user_group_maps';
$options->identity_column = 'joomla_gid';
parent::__construct($options);
}
示例11: __construct
/**
* Constructor
*
* @param object An optional KConfig object with configuration options
*/
public function __construct(KConfig $config)
{
$config->identity_column = 'ninjaboard_person_id';
parent::__construct($config);
}
示例12: __construct
/**
* Constructor
*
* @param object An optional KConfig object with configuration options
*/
public function __construct(KConfig $config)
{
$config->append(array('filters' => array('text' => 'raw', 'params' => 'json'), 'behaviors' => array('creatable', 'modifiable', KFactory::tmp('site::com.ninjaboard.database.behavior.postable'))));
parent::__construct($config);
$this->_column_map = array_merge($this->_column_map, array('created_by' => 'created_user_id', 'created_on' => 'created_time', 'modified_by' => 'modified_user_id', 'modified_on' => 'modified'));
}
示例13: __construct
/**
* Constructor
*
* @param object An optional KConfig object with configuration options
*/
public function __construct(KConfig $config)
{
parent::__construct($config);
$this->_column_map = array_merge($this->_column_map, array('name' => 'params', 'post' => 'post_id'));
}