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


PHP Room::__construct方法代码示例

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


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

示例1: doubleval

 function __construct($roomNumber, $price)
 {
     if (!empty($roomNumber) && ctype_digit($roomNumber) && !empty($price) && is_numeric($price)) {
         parent::__construct(intval($roomNumber), doubleval($price), self::BED_COUNT, self::HAS_BALCONY, new RoomType(RoomType::DIAMOND), self::EXTRAS, self::HAS_RESTROOM);
     } else {
         throw new InvalidArgumentException("Invalid parameters provided.");
     }
 }
开发者ID:AmaranthInHell,项目名称:SoftUni,代码行数:8,代码来源:Apartment.class.php

示例2:

 function __construct($roomNumber, $price)
 {
     parent::__construct($roomNumber, Bedroom::BED_COUNT, $price, true, true, RoomType::GOLD);
     $this->addExtras(Extra::TV);
     $this->addExtras(Extra::AIR_CONDITIONER);
     $this->addExtras(Extra::REFRIGERATOR);
     $this->addExtras(Extra::MINI_BAR);
     $this->addExtras(Extra::BATHTUB);
 }
开发者ID:alex687,项目名称:SoftUni-Homeworks,代码行数:9,代码来源:Bedroom.class.php

示例3:

 function __construct($roomNumber, $price)
 {
     parent::__construct($roomNumber, Apartment::BED_COUNT, $price, true, true, RoomType::DIAMOND);
     $this->addExtras(Extra::TV);
     $this->addExtras(Extra::AIR_CONDITIONER);
     $this->addExtras(Extra::REFRIGERATOR);
     $this->addExtras(Extra::MINI_BAR);
     $this->addExtras(Extra::BATHTUB);
     $this->addExtras(Extra::FREE_WI_FI);
     $this->addExtras(Extra::KITCHEN_BOX);
 }
开发者ID:TzvetanIG,项目名称:OOP,代码行数:11,代码来源:Apartment.class.php

示例4:

 function __construct($roomId, $price)
 {
     parent::__construct($roomId, 4, RoomType::DIAMOND, true, true, $price);
     $this->setExtras(Extra::TV);
     $this->setExtras(Extra::AIR_CONDITIONER);
     $this->setExtras(Extra::REFRIGERATOR);
     $this->setExtras(Extra::MINI_BAR);
     $this->setExtras(Extra::BATHTUB);
     $this->setExtras(Extra::KITCHEN_BOX);
     $this->setExtras(Extra::BATHTUB);
 }
开发者ID:nok32,项目名称:SoftUni,代码行数:11,代码来源:Apartment.class.php

示例5:

 function __construct($roomNumber, $price)
 {
     parent::__construct($roomNumber, RoomType::Standard, 1, true, false, $price, "TV", "Air-Conditioner");
 }
开发者ID:shnogeorgiev,项目名称:Software-University-Courses,代码行数:4,代码来源:SingleRoom.class.php

示例6:

 function __construct($roomNumber, $price)
 {
     parent::__construct($roomNumber, SingleRoom::BED_COUNT, $price, true, false, RoomType::STANDARD);
     $this->addExtras(Extra::TV);
     $this->addExtras(Extra::AIR_CONDITIONER);
 }
开发者ID:TzvetanIG,项目名称:OOP,代码行数:6,代码来源:SingleRoom.class.php

示例7:

 function __construct($roomNumber, $price)
 {
     parent::__construct(self::ROOM_TYPE, self::HAS_RESTROOM, self::HAS_BALCONY, self::BED_COUNT, $roomNumber, self::EXTRAS, $price);
 }
开发者ID:savin94,项目名称:SoftUni-Projects,代码行数:4,代码来源:Apartment.class.php

示例8: __construct

 public function __construct($roomNumber, $price)
 {
     $roomInfo = new RoomInfo("Gold", true, true, 2, $roomNumber, "TV, air-conditioner, refrigerator, mini-bar, bathtub", $price);
     parent::__construct($roomInfo);
 }
开发者ID:reminchev,项目名称:SoftUni-Projects,代码行数:5,代码来源:Bedroom.class.php

示例9: __construct

 public function __construct($roomNumber, $price)
 {
     $roomInfo = new RoomInfo("Standart", true, false, 1, $roomNumber, "TV, air-conditioner", $price);
     parent::__construct($roomInfo);
 }
开发者ID:reminchev,项目名称:SoftUni-Projects,代码行数:5,代码来源:SingleRoom.class.php

示例10:

 function __construct($roomNumber, $price)
 {
     parent::__construct($roomNumber, RoomType::Gold, 2, true, true, $price, "TV", "Air-Conditioner", "Refrigerator", "Mini-bar", "Bathtub");
 }
开发者ID:shnogeorgiev,项目名称:Software-University-Courses,代码行数:4,代码来源:Bedroom.class.php

示例11: __construct

 public function __construct($roomNumber, $price)
 {
     $roomInfo = new RoomInfo("Diamond", true, true, 4, $roomNumber, "TV, air-conditioner, refrigerator, kitchen box, mini-bar, bathtub, free Wi-fi", $price);
     parent::__construct($roomInfo);
 }
开发者ID:reminchev,项目名称:SoftUni-Projects,代码行数:5,代码来源:Apartment.class.php

示例12:

 function __construct($roomNumber, $price)
 {
     parent::__construct($roomNumber, 'SINGLE_ROOM_BEDS', $price, true, false, RoomType::STANDARD);
     $this->addExtras(Extra::TV);
     $this->addExtras(Extra::AIR_CONDITIONER);
 }
开发者ID:simeonemanuilov,项目名称:OOP,代码行数:6,代码来源:SingleRoom.class.php

示例13:

 function __construct($roomId, $price)
 {
     parent::__construct($roomId, 1, RoomType::STANDARD, true, false, $price);
     $this->setExtras(Extra::TV);
     $this->setExtras(Extra::AIR_CONDITIONER);
 }
开发者ID:nok32,项目名称:SoftUni,代码行数:6,代码来源:SingleRoom.class.php


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