You are here

public function AutoExpireFlashBag::peek in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/http-foundation/Session/Flash/AutoExpireFlashBag.php \Symfony\Component\HttpFoundation\Session\Flash\AutoExpireFlashBag::peek()

Gets flash messages for a given type.

Parameters

string $type Message category type.:

array $default Default value if $type does not exist.:

Return value

array

Overrides FlashBagInterface::peek

File

vendor/symfony/http-foundation/Session/Flash/AutoExpireFlashBag.php, line 85

Class

AutoExpireFlashBag
AutoExpireFlashBag flash message container.

Namespace

Symfony\Component\HttpFoundation\Session\Flash

Code

public function peek($type, array $default = array()) {
  return $this
    ->has($type) ? $this->flashes['display'][$type] : $default;
}