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


PHP Room::add方法代码示例

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


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

示例1: EIBDimmer

$akt = new EIBDimmer("light office", "1/1/201", "1/1/202", "", "", 0, 0);
$room->add($akt);
$config->addRoom($room);
$room = new Room("studio");
$akt = new EIBDimmer("group 1", "3/0/1", "3/0/11", "3/0/31", "3/0/61", "3/0/41", 0, 60);
$room->add($akt);
$akt = new EIBDimmer("group 2", "3/0/2", "3/0/12", "3/0/32", "3/0/62", "3/0/42", 0, 60);
$room->add($akt);
$config->addRoom($room);
$room = new Room("heating");
$akt = new EIBSwitch("comfort mode", "1/3/7", "1/3/7", 60);
$room->add($akt);
$akt = new EIBTemperature("room temperature", "1/3/4", "1/3/4", 0);
$room->add($akt);
$akt = new EIBTemperature("setpoint", "1/3/5", "1/3/5", 0);
$room->add($akt);
$akt = new EIBDimmer("heating", "", "", "", "1/3/10", "1/3/11", 0, 0);
$room->add($akt);
$akt = new EIBDimmer("cooling", "", "", "", "1/3/12", "1/3/13", 0, 0);
$room->add($akt);
$config->addRoom($room);
$room = new Room("miscellaneous");
$akt = new EIBSwitch("master switch", "1/0/0", "", 0);
$room->add($akt);
$akt = new EIBSwitch("master switch living room", "1/0/1", "", 0);
$room->add($akt);
$akt = new EIBSwitch("all lighting", "1/1/200", "", 0);
$room->add($akt);
$akt = new EIBSwitch("wind alarm", "1/0/2", "1/0/2", 0);
$room->add($akt);
$config->addRoom($room);
开发者ID:AdrienCourtois,项目名称:Domoleaf,代码行数:31,代码来源:config.php

示例2: Room

 public static function Room($type, $data)
 {
     require_once 'room.class.php';
     $class = new Room();
     $status = false;
     $class->setData($data);
     switch ($type) {
         case 'add':
             $status = $class->add();
             break;
         case 'update':
             $status = $class->update();
             break;
         case 'delete':
             $status = $class->delete();
             break;
         case 'getsingle':
             $status = $class->getsingle();
             break;
         case 'getpage':
             $status = $class->getpage();
             break;
         case 'search':
             $status = $class->search();
             break;
         default:
             break;
     }
     if ($status) {
         wp_send_json_success($status);
     } else {
         wp_send_json_error($class->error);
     }
 }
开发者ID:khiconit,项目名称:Device-manager,代码行数:34,代码来源:ManagementAdmin.class.php


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