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


PHP SimpleORMap类代码示例

本文整理汇总了PHP中SimpleORMap的典型用法代码示例。如果您正苦于以下问题:PHP SimpleORMap类的具体用法?PHP SimpleORMap怎么用?PHP SimpleORMap使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了SimpleORMap类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: tearDown

 function tearDown()
 {
     SimpleORMap::expireTableScheme();
     Config::set(null);
     StudipCacheFactory::setConfig(null);
     $GLOBALS['CACHING_ENABLE'] = false;
 }
开发者ID:ratbird,项目名称:hope,代码行数:7,代码来源:CronjobScheduleTest.php

示例2: up

 function up()
 {
     $db = DbManager::get();
     $db->exec("ALTER TABLE `datafields` CHANGE `type` `type` ENUM('bool','textline','textarea','selectbox','date','time','email','phone','radio','combo','link','selectboxmultiple') NOT NULL DEFAULT 'textline'");
     $db->exec("ALTER TABLE `datafields` ADD `is_userfilter` TINYINT UNSIGNED NOT NULL DEFAULT '0' AFTER `is_required`");
     SimpleORMap::expireTableScheme();
 }
开发者ID:ratbird,项目名称:hope,代码行数:7,代码来源:156_tic_5204_add_datafield_type.php

示例3: up

 function up()
 {
     $db = DBManager::get();
     $db->exec("ALTER TABLE `resources_requests` ADD `metadate_id` VARCHAR( 32 ) NOT NULL DEFAULT '' AFTER `termin_id`");
     $db->exec("ALTER TABLE `resources_requests` DROP INDEX  `closed` , ADD INDEX  `closed` (  `closed` ,  `request_id`, `resource_id` )");
     $db->exec("ALTER TABLE `resources_requests` ADD INDEX (  `metadate_id` )");
     SimpleORMap::expireTableScheme();
 }
开发者ID:ratbird,项目名称:hope,代码行数:8,代码来源:86_step_228_raumanfragen.php

示例4: up

 public function up()
 {
     DBManager::get()->exec("\n            ALTER TABLE `pluginmarket_plugins`\n            ADD `rating` DOUBLE NULL AFTER `language` ;\n        ");
     SimpleORMap::expireTableScheme();
     foreach (MarketPlugin::findBySQL("1=1") as $plugin) {
         $plugin['rating'] = $plugin->calculateRating();
         $plugin->store();
     }
 }
开发者ID:studip,项目名称:PluginMarket,代码行数:9,代码来源:04_add_rating_to_database.php

示例5: __construct

 public function __construct($id = null)
 {
     $this->db_table = 'doc_filetype_forbidden';
     $this->belongs_to['userConfig'] = array('class_name' => 'DocUsergroupConfig', 'foreign_key' => 'usergroup');
     $this->belongs_to['filetype'] = array('class_name' => 'DocFiletype', 'foreign_key' => 'dateityp_id');
     parent::__construct($id);
 }
开发者ID:ratbird,项目名称:hope,代码行数:7,代码来源:DocFileTypeForbidden.class.php

示例6: configure

 protected static function configure($config = array())
 {
     $config['db_table'] = 'archiv_user';
     $config['belongs_to']['user'] = array('class_name' => 'User', 'foreign_key' => 'user_id');
     $config['belongs_to']['course'] = array('class_name' => 'ArchivedCourse', 'foreign_key' => 'seminar_id');
     parent::configure($config);
 }
开发者ID:ratbird,项目名称:hope,代码行数:7,代码来源:ArchivedCourseMember.class.php

示例7: __construct

 /**
  * Give primary key of record as param to fetch
  * corresponding record from db if available, if not preset primary key
  * with given value. Give null to create new record
  *
  * @param mixed $id primary key of table
  */
 public function __construct($id = null)
 {
     $this->db_table = 'seminar_tabs';
     $this->belongs_to['course'] = array('class_name' => '\\Course', 'foreign_key' => 'seminar_id');
     // workaround for Stud.IP ticket:5312
     //$options = $this->getRelationOptions('course');
     //$options = $this->getRelationOptions('parent');
     /**
             $this->has_many['children'] = array(
                 'class_name'        => 'Mooc\\DB\\Block',
                 'assoc_foreign_key' => 'parent_id',
                 'assoc_func'        => 'findByParent_id',
                 'on_delete'         => 'delete',
                 'on_store'          => 'store'
             );
     
             $this->registerCallback('before_create', 'ensureSeminarId');
             $this->registerCallback('before_create', 'ensurePositionId');
             $this->registerCallback('before_store',  'validate');
     
             $this->registerCallback('after_delete',  'destroyFields');
             $this->registerCallback('after_delete',  'destroyUserProgress');
             $this->registerCallback('after_delete',  'updatePositionsAfterDelete');
     
             $events = words('after_create after_update after_store after_delete');
             $this->registerCallback($events, 'callbackToMetrics');
     		**/
     parent::__construct($id);
 }
开发者ID:anantace,项目名称:SeminarTabs,代码行数:36,代码来源:SeminarTab.class.php

示例8: delete

 function delete()
 {
     $old_assign_object = new AssignObject($this->id);
     $ret = parent::delete();
     $old_assign_object->delete();
     return $ret;
 }
开发者ID:ratbird,项目名称:hope,代码行数:7,代码来源:ResourceAssignment.class.php

示例9: configure

 protected static function configure($config = array())
 {
     $config['db_table'] = 'archiv';
     $config['has_many']['members'] = array('class_name' => 'ArchivedCourseMember', 'on_delete' => 'delete', 'on_store' => 'store');
     $config['belongs_to']['home_institut'] = array('class_name' => 'Institute', 'foreign_key' => 'heimat_inst_id');
     parent::configure($config);
 }
开发者ID:ratbird,项目名称:hope,代码行数:7,代码来源:ArchivedCourse.class.php

示例10: configure

 protected static function configure($config = array())
 {
     $config['db_table'] = 'questionnaire_answers';
     $config['belongs_to']['question'] = array('class_name' => 'QuestionnaireQuestion');
     $config['serialized_fields']['answerdata'] = "JSONArrayObject";
     parent::configure($config);
 }
开发者ID:ratbird,项目名称:hope,代码行数:7,代码来源:QuestionnaireAnswer.php

示例11: configure

 protected static function configure($config = array())
 {
     $config['db_table'] = 'questionnaires';
     $config['has_many']['questions'] = array('class_name' => 'QuestionnaireQuestion', 'on_delete' => 'delete', 'on_store' => 'store');
     $config['has_many']['assignments'] = array('class_name' => 'QuestionnaireAssignment', 'on_delete' => 'delete', 'on_store' => 'store');
     parent::configure($config);
 }
开发者ID:ratbird,项目名称:hope,代码行数:7,代码来源:Questionnaire.php

示例12: __construct

 /**
  * Initialize a new directory entry object for the given id.
  *
  * @param string $id  directory entry id
  * @throws InvalidArgumentException if id of directory entry is invalid
  */
 public function __construct($id = null)
 {
     parent::__construct($id);
     if ($id !== null && $this->isNew()) {
         throw new InvalidArgumentException('directory entry not found');
     }
 }
开发者ID:ratbird,项目名称:hope,代码行数:13,代码来源:DirectoryEntry.php

示例13: store

 public function store()
 {
     if (!$this['public_key']) {
         $this->createKeys();
     }
     return parent::store();
 }
开发者ID:Krassmus,项目名称:LehrMarktplatz,代码行数:7,代码来源:LernmarktplatzIdentity.php

示例14: configure

 protected static function configure($config = array())
 {
     $config['db_table'] = 'contact';
     $config['belongs_to']['owner'] = array('class_name' => 'User', 'foreign_key' => 'owner_id');
     $config['belongs_to']['friend'] = array('class_name' => 'User', 'foreign_key' => 'user_id');
     $config['has_many']['group_assignments'] = array('class_name' => 'StatusgruppeUser', 'foreign_key' => 'user_id', 'assoc_foreign_key' => 'user_id', 'on_delete' => 'delete', 'on_store' => 'store');
     parent::configure($config);
 }
开发者ID:ratbird,项目名称:hope,代码行数:8,代码来源:Contact.class.php

示例15: configure

 protected static function configure($config = array())
 {
     $config['db_table'] = 'eval';
     $config['belongs_to']['author'] = array('class_name' => 'User', 'foreign_key' => 'author_id');
     $config['has_and_belongs_to_many']['participants'] = array('class_name' => 'User', 'thru_table' => 'eval_user');
     $config['additional_fields']['enddate'] = true;
     parent::configure($config);
 }
开发者ID:ratbird,项目名称:hope,代码行数:8,代码来源:StudipEvaluation.php


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