You are here

public function FlashBag::peek in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-foundation/Session/Flash/FlashBag.php \Symfony\Component\HttpFoundation\Session\Flash\FlashBag::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/FlashBag.php, line 81

Class

FlashBag
FlashBag flash message container.

Namespace

Symfony\Component\HttpFoundation\Session\Flash

Code

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