Download the PHP package volnix/flashy without Composer

On this page you can find all versions of the php package volnix/flashy. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package flashy

Flashy

Simple wrapper around Symfony's Session flashbag.

Build Status Coverage Status Total Downloads Latest Stable Version

There are two pieces to flashy: Messages.

Prefill Data

Often you will want to pre-fill form data from the last request when there are errors with user input. Flashy will accept input from any source, whether it was from POST/GET or a generated array. It is using Symfony's AutoExpireFlashBag container so data is cleared after every request whether it is read or not.

To set the form data is done by calling the set method:

You would then call get to retrieve data, optionally passing a default value to use if the key is not set.

To empty the form data storage, call the clear function:

Messages

The Messages class will make handling flash messages a breeze. It is loosely tied to Bootstrap 3 for its alert markup, but this can easily be overridden. It is also using Symfony's AutoExpireFlashBag container.

The __call magic method is used to allow any type of messages for maximum portability.

To set a type of message, you may call any function, passing in a string or an array of messages, e.g.:

You may also set messages as an array of [type => messages], e.g.:

To retrieve them as an array, use the get function (if not arg is passed, it will return all messages:

The real magic happen when you call the getFormatted function:

Formatted messages are printed in the following markup:

To override the default Bootstrap alert syntax, pass an array of class overrides to the getFormatted function:

will yield:

The Messages class also supports nesting of messages, e.g.:

will yield:

To empty the messages storage, call the clear function:


All versions of flashy with dependencies

PHP Build Version
Package Version
Requires php Version >= 5.4
symfony/http-foundation Version 2.5.*@dev
satooshi/php-coveralls Version 0.7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package volnix/flashy contains the following files

Loading the files please wait ....