2017 © Pedro Peláez
 

library dot-controller-plugin-flashmessenger

DotKernel flash messenger controller plugin

image

dotkernel/dot-controller-plugin-flashmessenger

DotKernel flash messenger controller plugin

  • Monday, May 14, 2018
  • by dotkernel
  • Repository
  • 2 Watchers
  • 1 Stars
  • 650 Installations
  • PHP
  • 3 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 7 % Grown

The README.md

[!CAUTION], (*1)

Security-Only Maintenance Mode

This package is considered feature-complete, and is now in security-only maintenance mode., (*2)

dot-controller-plugin-flashmessenger

Flashmessenger controller plugin for easy access to the flash messenger from any controller., (*3)

OSS Lifecycle GitHub license PHP from Packagist (specify version), (*4)

Installation

Run the following command in your project root directory, (*5)

$ composer require dotkernel/dot-controller-plugin-flashmessenger

This will also install packages dotkernel/dot-controller and dotkernel/dot-flashmessenger as dependencies. Next, make sure you merge the ConfigProvider to your application's configuration in order to register the default dependencies., (*6)

Usage

In any controller, you can access the plugin by calling, (*7)

$this->messenger()->...

The methods defined by this plugin are, (*8)

$this->messenger()->addMessage($namespace, $value);

Adds a session message to at the requested namespace, (*9)

$this->messenger()->addData($key, $data);

Almost the same as the addMessage method, but named differently in order to reserve this function for adding general session data., (*10)

There are also some shortcuts to the addMessage method which are using predefined namespaces, (*11)

$this->messenger()->addError($error);

$this->messenger()->addWarning($message);

$this->messenger()->addInfo($message);

$this->messenger()->addSuccess($message);

Also, the getter methods, (*12)

$this->messenger()->getMessages($namespace = null);

Gets all messages under a namespace, or if namespace is not specified it will return all namespaces with all messages, (*13)

$this->messenger()->getData($key);

Gets the data stored at the specified key, (*14)

The Versions

14/05 2018

dev-master

9999999-dev

DotKernel flash messenger controller plugin

  Sources   Download

MIT

The Requires

 

The Development Requires

by n3vrax
by DotKernel Team

14/05 2018

v1.0.0

1.0.0.0

DotKernel flash messenger controller plugin

  Sources   Download

MIT

The Requires

 

The Development Requires

by DotKernel Team

14/05 2018

dev-develop

dev-develop

DotKernel flash messenger controller plugin

  Sources   Download

MIT

The Requires

 

The Development Requires

by n3vrax
by DotKernel Team

21/04 2017

0.2.1

0.2.1.0

DotKernel flash messenger controller plugin

  Sources   Download

MIT

The Requires

 

The Development Requires

by n3vrax

15/03 2017

0.2.0

0.2.0.0

DotKernel flash messenger controller plugin

  Sources   Download

MIT

The Requires

 

The Development Requires

by n3vrax

10/03 2017

0.1.1

0.1.1.0

DotKernel flash messenger controller plugin

  Sources   Download

MIT

The Requires

 

The Development Requires

by n3vrax

09/03 2017

0.1.0

0.1.0.0

DotKernel flash messenger controller plugin

  Sources   Download

MIT

The Requires

 

The Development Requires

by n3vrax