当前位置: 首页>>代码示例>>PHP>>正文


PHP KDatabaseTableDefault::__construct方法代码示例

本文整理汇总了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);
 }
开发者ID:kedweber,项目名称:com_makundi,代码行数:11,代码来源:nodes.php

示例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;
 }
开发者ID:raeldc,项目名称:nooku-server,代码行数:9,代码来源:users.php

示例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;
         }
     }
 }
开发者ID:ravenlife,项目名称:Ninja-Framework,代码行数:12,代码来源:settings.php

示例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 = '/';
 }
开发者ID:ravenlife,项目名称:Ninjaboard,代码行数:18,代码来源:forums.php

示例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;
 }
开发者ID:kedweber,项目名称:com_featured,代码行数:18,代码来源:nodes.php

示例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);
 }
开发者ID:ravenlife,项目名称:Ninjaboard,代码行数:10,代码来源:messages.php

示例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);
 }
开发者ID:ravenlife,项目名称:Ninjaboard,代码行数:10,代码来源:topics.php

示例8: __construct

 public function __construct(KConfig $config)
 {
     parent::__construct($config);
     $this->getColumn('email')->unique = true;
     $this->getColumn('username')->unique = true;
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:6,代码来源:users.php

示例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);
 }
开发者ID:ravenlife,项目名称:Ninjaboard,代码行数:10,代码来源:logtopicreads.php

示例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);
 }
开发者ID:ravenlife,项目名称:Ninjaboard,代码行数:11,代码来源:joomlausergroupmaps.php

示例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);
 }
开发者ID:ravenlife,项目名称:Ninjaboard,代码行数:10,代码来源:people.php

示例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'));
 }
开发者ID:ravenlife,项目名称:Ninjaboard,代码行数:11,代码来源:posts.php

示例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'));
 }
开发者ID:ravenlife,项目名称:Ninjaboard,代码行数:10,代码来源:attachments.php


注:本文中的KDatabaseTableDefault::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。