本文整理匯總了PHP中Illuminate\Session\Store::push方法的典型用法代碼示例。如果您正苦於以下問題:PHP Store::push方法的具體用法?PHP Store::push怎麽用?PHP Store::push使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Illuminate\Session\Store
的用法示例。
在下文中一共展示了Store::push方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: push
/**
* Push a value onto a session array.
*
* @param string $key
* @param mixed $value
* @return void
* @static
*/
public static function push($key, $value)
{
\Illuminate\Session\Store::push($key, $value);
}
示例2: onFlash
/**
* Execute this event to flash messages.
*
* @param Notification $notification
* @param NotificationsBag $notificationBag
* @param Message $message
* @return bool
*/
public function onFlash(Notification $notification, NotificationsBag $notificationBag, Message $message)
{
$key = implode('.', [$this->key, $notificationBag->getName()]);
$this->session->push($key, $message);
return true;
}
示例3: storeCurrentHash
/**
* Stores the current hash in session
*/
protected function storeCurrentHash()
{
$this->session->push('tracker.views', $this->getCurrentHash());
}
示例4:
function it_sends_the_notifications_to_the_store(Store $store)
{
$notification = ['type' => 'success', 'message' => 'It is successful'];
$store->push('my-key.new', $notification)->shouldBeCalled();
$this->push('my-key.new', $notification);
}
示例5: push
/**
* @param string $key
* @param array $notification
* @return void
*/
public function push($key, array $notification)
{
$this->store->push($key, $notification);
}