2017 © Pedro Peláez
 

library php-flash-messages

image

dtkahl/php-flash-messages

  • Sunday, March 19, 2017
  • by dtkahl
  • Repository
  • 1 Watchers
  • 1 Stars
  • 39 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Latest Stable Version License Build Status, (*1)

PHP flash messages

Session flash messages for PHP, (*2)

Dependencies

  • PHP >= 5.6.0

Installation

Install with Composer:, (*3)

composer require dtkahl/php-flash-messages

Usage

session_start();
$flash = new \Dtkahl\FlashMessages\FlashMessages;

**Warning:* Every new instance will be handled as new call and trunked data under given key in given store., (*4)

Methods

get($type, $key, $default = null)

Returns message with given $type and $key from last call or $default if there is no message., (*5)

or call with predefined type: - getError($key, $default = null) - getWarning($key, $default = null) - getSuccess($key, $default = null) - getInfo($key, $default = null), (*6)

has($type, $key)

Determine if there is any message with given $type and $key from last call., (*7)

or call with predefined type: - hasError($key) - hasWarning($key) - hasSuccess($key) - hasInfo($key), (*8)

set($type, $key, $value)

Save message with given $type and $key to store for next call., (*9)

or call with predefined type: - setError($key, $value) - setWarning($key, $value) - setSuccess($key, $value) - setInfo($key, $value), (*10)

remove($type, $key)

Remove message with given $type and $key from store for next call., (*11)

or call with predefined type: - removeError($key) - removeWarning($key) - removeSuccess($key) - removeInfo($key), (*12)

removeAll($type)

Remove all messages with given $type from store for next call., (*13)

or call with predefined type: - removeError($key) - removeWarning($key) - removeSuccess($key) - removeInfo($key), (*14)

getAll($type)

Return an array of all messages with given $type from last call., (*15)

or call with predefined type: - getAllError() - getAllWarning() - getAllSuccess() - getAllInfo(), (*16)

getAllTypes()

Return an array of all types and their messages from last call., (*17)

hasAny($type)

Determine if there is any messages with given $type from last call., (*18)

or call with predefined type: - hasAnyError() - hasAnyWarning() - hasAnySuccess() - hasAnyInfo(), (*19)

The Versions

19/03 2017

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

The Development Requires

20/05 2016

1.1.0

1.1.0.0

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

The Development Requires

20/05 2016

1.0.1

1.0.1.0

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

The Development Requires

19/05 2016

1.0.0

1.0.0.0

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

The Development Requires

19/05 2016

0.1.0

0.1.0.0

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

The Development Requires