コード例 #1
0
ファイル: View.php プロジェクト: SerdarSanri/simplemessage
 /**
  * Create a new view instance.
  *
  * @param LaravelFactory $environment
  * @param \Illuminate\View\Engines\EngineInterface $engine
  * @param \Illuminate\Translation\Translator $translator
  * @param string $view
  * @param string $path
  * @param array $data
  * @param Store $session
  * @return \Jgallred\Simplemessage\View\View
  */
 public function __construct(LaravelFactory $environment, EngineInterface $engine, Translator $translator, $view, $path, $data = array(), Store $session = null)
 {
     parent::__construct($environment, $engine, $view, $path, $data);
     $this->translator = $translator;
     // If a session driver has been specified, we will bind an instance of the
     // message container to every view. If a container instance
     // exists in the session, we will use that instance.
     if (!isset($this->data[$this->messages_key])) {
         if ($session && $session->isStarted() and $session->has($this->messages_key)) {
             $this->data[$this->messages_key] = $session->get($this->messages_key);
         } else {
             $this->data[$this->messages_key] = new TypedMessages();
         }
     }
 }
コード例 #2
0
ファイル: _ide_helper.php プロジェクト: satriashp/tour
 /**
  * Checks if the session was started.
  *
  * @return bool 
  * @static 
  */
 public static function isStarted()
 {
     return \Illuminate\Session\Store::isStarted();
 }