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


PHP Room::setDescription方法代码示例

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


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

示例1: Right

$s1->save();
$r1 = new Right();
$r1->setSection($s1->getId());
$r1->setRead('1');
$r1->setDelete('1');
$r1->setCreate('1');
$r1->setUpdate('1');
$r1->setRank('1');
$r1->save();
$conf = new Configuration();
$conf->put('plugin_kodiCmd_api_url_kodi', 'http://192.168.1.107:85/jsonrpc');
$conf->put('plugin_kodiCmd_api_timeout_kodi', 5);
$conf->put('plugin_kodiCmd_api_recognition_status', '');
$ro = new Room();
$ro->setName('KODI');
$ro->setDescription('De la bonne zic, un bon p\'tit film....');
$ro->save();
$roomManager = new Room();
$rooms = $roomManager->populate();
foreach ($rooms as $room) {
    if ($room->getName() == "KODI") {
        $kodiRoomId = $room->getId();
    }
}
$id = 0;
$kodi = new KodiCmd();
$kodi->setName('à droite');
$kodi->setDescription('se déplacer à droite');
$kodi->setJson('"method":"Input.Right","id":"1"');
$kodi->setConfidence('0.8');
$kodi->setRoom($kodiRoomId);
开发者ID:eflye,项目名称:yana-plugins,代码行数:31,代码来源:install.php

示例2: 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

示例3: migratePaperLocations

 /**
  * For upgrade to 2.1.0: Migrate paper locations into scheduler
  * @return boolean
  */
 function migratePaperLocations()
 {
     $paperDao = DAORegistry::getDAO('PaperDAO');
     $buildingDao = DAORegistry::getDAO('BuildingDAO');
     $roomDao = DAORegistry::getDAO('RoomDAO');
     $lastSchedConfId = null;
     $buildingId = null;
     $result =& $paperDao->retrieve("SELECT p.paper_id, c.primary_locale, sc.sched_conf_id, p.location FROM papers p, published_papers pp, sched_confs sc, conferences c WHERE p.paper_id = pp.paper_id AND p.sched_conf_id = sc.sched_conf_id AND sc.conference_id = c.conference_id AND location IS NOT NULL AND location <> '' ORDER BY sched_conf_id");
     while (!$result->EOF) {
         $row = $result->GetRowAssoc(false);
         $paperId = $row['paper_id'];
         $schedConfId = $row['sched_conf_id'];
         $locale = $row['primary_locale'];
         $location = $row['location'];
         if ($schedConfId !== $lastSchedConfId) {
             // Create a default building
             $defaultText = __('common.default');
             $building = new Building();
             $building->setSchedConfId($schedConfId);
             $building->setName($defaultText, $locale);
             $building->setAbbrev($defaultText, $locale);
             $building->setDescription($defaultText, $locale);
             $buildingId = $buildingDao->insertBuilding($building);
             unset($building);
             $rooms = array();
         }
         if (!isset($rooms[$location])) {
             $room = new Room();
             $room->setBuildingId($buildingId);
             $room->setName($location, $locale);
             $room->setAbbrev($location, $locale);
             $room->setDescription($location, $locale);
             $roomId = $roomDao->insertRoom($room);
             $rooms[$location] =& $room;
             unset($room);
         } else {
             $room =& $rooms[$location];
             $roomId = $room->getId();
             unset($room);
         }
         $paperDao->update('UPDATE published_papers SET room_id = ? WHERE paper_id = ?', array($roomId, $paperId));
         $result->MoveNext();
         $lastSchedConfId = $schedConfId;
     }
     $result->Close();
     unset($result);
     return true;
 }
开发者ID:artkuo,项目名称:ocs,代码行数:52,代码来源:Upgrade.inc.php

示例4: modifyRoom

 public function modifyRoom()
 {
     $msg = "";
     $room = new Room();
     if ($room->access_ModelMember_sessionExists() && $room->access_ModelMember_userAdmin()) {
         // Récupération de l'id passée en URL
         $id = $_GET['id'];
         $room->setIdSalle($id);
         $modRoom = $room->findRoom();
         if ($_POST) {
             $id_salle = $modRoom['id_salle'];
             $pays = htmlentities($_POST['pays'], ENT_QUOTES, "utf-8");
             $ville = htmlentities($_POST['ville'], ENT_QUOTES, "utf-8");
             $adresse = htmlentities($_POST['adresse'], ENT_QUOTES, "utf-8");
             $cp = htmlentities($_POST['cp'], ENT_QUOTES, "utf-8");
             $titre = htmlentities($_POST['titre'], ENT_QUOTES, "utf-8");
             $description = htmlentities($_POST['description'], ENT_QUOTES, "utf-8");
             $photo = $_FILES['photo'];
             $capacite = htmlentities($_POST['capacite'], ENT_QUOTES, "utf-8");
             $categorie = htmlentities($_POST['categorie'], ENT_QUOTES, "utf-8");
             // Instancie un nouvel objet room
             $room = new Room();
             $room->setIdSalle($id_salle);
             // Je remplis le nouvel objet avec les valeurs récupérées dans le formulaire
             $room->setPays($pays);
             $room->setVille($ville);
             $room->setAdresse($adresse);
             $room->setCP($cp);
             $room->setTitre($titre);
             $room->setDescription($description);
             $room->setPhoto($photo);
             $room->setCapacite($capacite);
             $room->setCategorie($categorie);
             $msgError = "";
             // VERIFICATIONS SI LA PHOTO EST CHANGEE
             if (!empty($_FILES['photo']['name'])) {
                 $resultArray = $room->checkPhotoReplace();
                 for ($i = 0; $i < count($resultArray); $i++) {
                     if (!$resultArray[$i]->getPassed()) {
                         $msgError .= $resultArray[$i]->getErrorMessage();
                         $msgError .= "<br/>";
                     }
                 }
             }
             if ($msgError == "") {
                 $room->replaceRoom();
                 header('location:index.php?controller=rooms&action=roomModified');
                 //                    $msg = '<p class="validation">Bravo, la salle a bien été enregistrée</p>';
                 // Appeler une autre page pour rafficher la salle modifiée ?
             } else {
                 $msg .= $msgError;
             }
         }
     } else {
         $msg .= 'Vous n\'avez pas le droit d\'accéder à cette page.<br/>';
     }
     include "views/rooms/modifyRooms.php";
 }
开发者ID:GiGis971,项目名称:evoyage,代码行数:58,代码来源:rooms.php

示例5: array

 $price = $database->escapeString($_POST['price']);
 $persons = $database->escapeString($_POST['persons']);
 $isAvailable = $database->escapeString($_POST['isAvailable']);
 $availableUntil = $database->escapeString($_POST['availableUntil']);
 $description = $database->escapeString($_POST['description']);
 $hotelId = $database->escapeString($_POST['hotelId']);
 $room->setRoomName($name);
 $room->setPrice($price);
 $room->setPersons($persons);
 $room->setIsAvailable($isAvailable);
 if ($isAvailable == 1) {
     $room->setAvailableUntil($availableUntil);
 } else {
     $room->setAvailableUntil("NOT AVAILABLE");
 }
 $room->setDescription($description);
 $room->setHotelId($hotelId);
 if (isset($_POST['roomId'])) {
     $roomId = $database->escapeString($_POST['hotelId']);
     $room->setRoomId($roomId);
     $hotel->update($database);
 } else {
     $roomId = $room->create($database);
 }
 if (count($_FILES) != 0) {
     $error = 0;
     $files = array();
     $uploaddir = "../images/rooms/large/";
     $uploaddirthumb = "../images/rooms/thumb/";
     $nameArray = $_FILES['mediaUploads']['name'];
     $typeArray = $_FILES['mediaUploads']['type'];
开发者ID:jetmirhaxhisefa,项目名称:rezervime,代码行数:31,代码来源:createAndEditRoom.php


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