本文整理汇总了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.");
}
}
示例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);
}
示例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);
}
示例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);
}
示例5:
function __construct($roomNumber, $price)
{
parent::__construct($roomNumber, RoomType::Standard, 1, true, false, $price, "TV", "Air-Conditioner");
}
示例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);
}
示例7:
function __construct($roomNumber, $price)
{
parent::__construct(self::ROOM_TYPE, self::HAS_RESTROOM, self::HAS_BALCONY, self::BED_COUNT, $roomNumber, self::EXTRAS, $price);
}
示例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);
}
示例9: __construct
public function __construct($roomNumber, $price)
{
$roomInfo = new RoomInfo("Standart", true, false, 1, $roomNumber, "TV, air-conditioner", $price);
parent::__construct($roomInfo);
}
示例10:
function __construct($roomNumber, $price)
{
parent::__construct($roomNumber, RoomType::Gold, 2, true, true, $price, "TV", "Air-Conditioner", "Refrigerator", "Mini-bar", "Bathtub");
}
示例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);
}
示例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);
}
示例13:
function __construct($roomId, $price)
{
parent::__construct($roomId, 1, RoomType::STANDARD, true, false, $price);
$this->setExtras(Extra::TV);
$this->setExtras(Extra::AIR_CONDITIONER);
}