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