Overview

Namespaces

  • Faulancer
    • Controller
    • Exception
    • Form
      • Validator
        • Type
    • Helper
      • Reflection
    • Http
    • Mail
    • ORM
      • User
    • Service
      • Factory
    • ServiceLocator
    • Session
    • View
      • Helper

Classes

  • AssetList
  • Block
  • CodeBlock
  • EndBlock
  • EscapeString
  • FlashBag
  • FormData
  • FormError
  • GenerateCsrfToken
  • Highlighter
  • ParentTemplate
  • RenderBlock
  • RenderView
  • Route
  • Translate
  • User
  • Overview
  • Namespace
  • Class
 1:  2:  3:  4:  5:  6:  7:  8:  9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 
<?php
/**
 * Class FlashBag | FlashBag.php
 * @package Faulancer\View\Helper
 * @author  Florian Knapp <office@florianknapp.de>
 */
namespace Faulancer\View\Helper;

use Faulancer\Service\SessionManagerService;
use Faulancer\View\AbstractViewHelper;

/**
 * Class FlashBag
 */
class FlashBag extends AbstractViewHelper
{

    /**
     * @return self
     */
    public function __invoke()
    {
        return $this;
    }

    /**
     * @param string $key
     * @return array|null|string
     */
    public function get(string $key)
    {
        return $this->getServiceLocator()->get(SessionManagerService::class)->getFlashbag($key);
    }

}
API documentation generated by ApiGen