本文整理匯總了PHP中Store::working_hours方法的典型用法代碼示例。如果您正苦於以下問題:PHP Store::working_hours方法的具體用法?PHP Store::working_hours怎麽用?PHP Store::working_hours使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Store
的用法示例。
在下文中一共展示了Store::working_hours方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: working_hours
$day = "weekday";
}
return $day;
}
public function working_hours()
{
$day1 = $this->isWeekend();
if ($day1 == "weekend") {
echo "<br/> Working Hours of {$this->name}: <br/> 10h. - 16h. <br/>";
} elseif ($day1 == "weekday") {
echo "<br/> Working Hours of {$this->name}: <br/> 9h. - 19h. <br/>";
}
}
}
$pearPhone = new Product('PearPhone', 'TX300', 'Phone', 750, 17, 2014);
$pearPhone->show_info();
$pearPhone->buyItems(15);
$pearPhone->show_info();
$pearPhone->isAvailable();
$pearPhone->year = 2015;
echo "Release year corrected. New year: {$pearPhone->year}. <br/>";
echo "Review of the product: {$pearPhone->review} <br/>";
$pearBook = new Product('PearBook', 'L350', 'Notebook', 1250, 21, 2015);
$pearBook->show_info();
$pearBook->newItems(16);
$main_store = new Store('p-Store', 'Pear Street 75', 'Michael Sheldon', 1200000, 800, 18);
$main_store->show_store();
$sec_store = new Store('NoteBook', 'Fearville Street 18', 'George Kennedy', 3500875, 958, 25);
$sec_store->show_store();
$sec_store->working_hours();
$sec_store->hire_employee('Carter Flemings', 'manager', 2150);