本文整理匯總了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));
}