本文整理汇总了PHP中Reservation::all_future方法的典型用法代码示例。如果您正苦于以下问题:PHP Reservation::all_future方法的具体用法?PHP Reservation::all_future怎么用?PHP Reservation::all_future使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Reservation
的用法示例。
在下文中一共展示了Reservation::all_future方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
public static function index()
{
$user = self::get_user_logged_in();
$future_reservations = Reservation::all_future($user->manager ? null : $user->id);
$past_reservations = Reservation::all_past($user->manager ? null : $user->id);
View::make('reservation/index.html', array('future_reservations' => $future_reservations, 'past_reservations' => $past_reservations));
}
示例2: index
public static function index()
{
$user = self::get_user_logged_in();
$reservations = null;
$invoices = null;
$utilization_rates = null;
if ($user) {
$reservations = $user->manager ? Reservation::all_future(null, 5, false) : Reservation::all_future($user->id, 5, false);
$invoices = $user->manager ? Invoice::all(5) : Invoice::all_for_user($user->id, 5);
$utilization_rates = $user->manager ? Service::utilization_rates() : null;
}
View::make('index.html', array('reservations' => $reservations, 'invoices' => $invoices, 'utilization_rates' => $utilization_rates));
}