Download the PHP package vaibhavpandeyvpz/phlash without Composer

On this page you can find all versions of the php package vaibhavpandeyvpz/phlash. 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 phlash

Phlash

Latest Version Downloads PHP Version Build Status

A lightweight PHP library for managing flash messages that can be made available either immediately (in the current request) or in the next request. Perfect for use with any micro or full-stack framework.

Features

Requirements

Installation

Install via Composer:

Quick Start

Usage

Basic Usage

Flash Messages for Current Request

Messages flashed with flashNow() are immediately available in the same request:

Flash Messages for Next Request

Messages flashed with flashLater() are not available in the current request, but will be available when a new instance is created (simulating the next request):

Retrieving Messages

Get All Messages

Get Specific Message

Custom Storage

By default, ArrayFlash uses $_SESSION for storage. You can provide a custom array for storage:

Common Use Cases

Form Validation Errors

Success Messages

Mixed Messages

Data Types

Phlash supports any data type for flash messages:

API Reference

ArrayFlash

The main implementation class for flash message storage.

Constructor

Methods

flashNow(string $key, mixed $message): void

Flash a message to be available in the current request.

flashLater(string $key, mixed $message): void

Flash a message to be available in the next request.

get(?string $key = null): mixed

Retrieve flashed messages.

Architecture

Phlash uses a simple but effective architecture:

The library uses a "bag" system where messages are stored in either the "now" bag (current request) or "later" bag (next request). When a new ArrayFlash instance is created, messages from "later" are automatically moved to "now", simulating the transition between requests.

Testing

The library includes a comprehensive test suite with 100% code coverage:

License

This project is open-sourced software licensed under the MIT license.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Author

Vaibhav Pandey


All versions of phlash with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
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 vaibhavpandeyvpz/phlash contains the following files

Loading the files please wait ...