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


PHP Room::getId方法代码示例

本文整理汇总了PHP中Room::getId方法的典型用法代码示例。如果您正苦于以下问题:PHP Room::getId方法的具体用法?PHP Room::getId怎么用?PHP Room::getId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Room的用法示例。


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

示例1: setRoom

 /**
  * Declares an association between this object and a Room object.
  *
  * @param      Room $v
  * @return     RoomHasFeaturevalue The current object (for fluent API support)
  * @throws     PropelException
  */
 public function setRoom(Room $v = null)
 {
     if ($v === null) {
         $this->setRoomId(NULL);
     } else {
         $this->setRoomId($v->getId());
     }
     $this->aRoom = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the Room object, it will not be re-added.
     if ($v !== null) {
         $v->addRoomHasFeaturevalue($this);
     }
     return $this;
 }
开发者ID:jfesquet,项目名称:tempos,代码行数:22,代码来源:BaseRoomHasFeaturevalue.php

示例2: addInstanceToPool

 /**
  * Adds an object to the instance pool.
  *
  * Propel keeps cached copies of objects in an instance pool when they are retrieved
  * from the database.  In some cases -- especially when you override doSelect*()
  * methods in your stub classes -- you may need to explicitly add objects
  * to the cache in order to ensure that the same objects are always returned by doSelect*()
  * and retrieveByPK*() calls.
  *
  * @param      Room $value A Room object.
  * @param      string $key (optional) key to use for instance map (for performance boost if key was already calculated externally).
  */
 public static function addInstanceToPool(Room $obj, $key = null)
 {
     if (Propel::isInstancePoolingEnabled()) {
         if ($key === null) {
             $key = (string) $obj->getId();
         }
         // if key === null
         self::$instances[$key] = $obj;
     }
 }
开发者ID:lejacome,项目名称:hospital-mgt,代码行数:22,代码来源:BaseRoomPeer.php

示例3: execute

 /**
  * Save room. 
  */
 function execute()
 {
     $roomDao = DAORegistry::getDAO('RoomDAO');
     $schedConf =& Request::getSchedConf();
     if (isset($this->roomId)) {
         $room =& $roomDao->getRoom($this->roomId);
     }
     if (!isset($room)) {
         $room = new Room();
     }
     $room->setBuildingId($this->buildingId);
     $room->setName($this->getData('name'), null);
     // Localized
     $room->setAbbrev($this->getData('abbrev'), null);
     // Localized
     $room->setDescription($this->getData('description'), null);
     // Localized
     // Update or insert room
     if ($room->getId() != null) {
         $roomDao->updateRoom($room);
     } else {
         $roomDao->insertRoom($room);
     }
 }
开发者ID:artkuo,项目名称:ocs,代码行数:27,代码来源:RoomForm.inc.php

示例4: processTopicForm

 /**
  * 
  * @param sfWebRequest $request
  * @param sfForm $form
  * @param Room $room
  * @return <bool> false if preview action
  */
 protected function processTopicForm(sfWebRequest $request, sfForm $form, Room $room, User $user)
 {
     $form->bind($request->getParameter($form->getName()), $request->getFiles($form->getName()));
     if ($form->isValid()) {
         if ($this->getRequestParameter('submitAct')) {
             $values = $form->getValues();
             // topic saving
             $topic = new Topic();
             $topic->setTitle($values['title']);
             $topic->setIdRoom($room->getId());
             $topic->setIdUser($user->getId());
             $topic->save();
             // post saving
             $post = new Post();
             $post->setContent($values['post']['content']);
             $post->setIdTopic($topic->getId());
             $post->setIdUser($user->getId());
             $post->save();
             $this->redirect('room_topic_show', $topic);
         } else {
             if ($this->getRequestParameter('prevSubmitAct')) {
                 return;
             } else {
                 return false;
             }
         }
     }
 }
开发者ID:rollmax,项目名称:read2read,代码行数:35,代码来源:actions.class.php

示例5: processCopyForm

 protected function processCopyForm(sfWebRequest $request, sfForm $form, Room $room)
 {
     $form->bind($request->getParameter($form->getName()), $request->getFiles($form->getName()));
     if ($form->isValid()) {
         $this->forward404Unless($copyRoom = RoomPeer::retrieveByPk($form->getValue('copyRoom_id')), sprintf('Object room does not exist (%s).', $form->getValue('copyRoom_id')));
         if ($copyRoom->getId() != $room->getId()) {
             $room->copyDayperiodsFromRoom($copyRoom);
             $room->save();
         }
         $this->redirect('dayperiod/index?roomId=' . $room->getId());
     }
 }
开发者ID:jfesquet,项目名称:tempos,代码行数:12,代码来源:actions.class.php

示例6: copyDayperiodsFromRoom

 public function copyDayperiodsFromRoom(Room $room)
 {
     if ($room->getId() == $this->getId()) {
         return;
     }
     $this->clearDayperiods();
     $dayperiods = $room->getDayperiods();
     foreach ($dayperiods as $dayperiod) {
         $newDayperiod = $dayperiod->copyWithoutRoom();
         $this->addDayperiod($newDayperiod);
     }
 }
开发者ID:jfesquet,项目名称:tempos,代码行数:12,代码来源:Room.php


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