Download the PHP package cse/base-singleton without Composer
On this page you can find all versions of the php package cse/base-singleton. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package base-singleton
English | Русский
SINGLETON CSE BASE
A Singleton Design Pattern which allow easy used singleton class.
Project repository: https://github.com/cs-eliseev/base-singleton
DEMO
Introduction
CSE BASE is a set of libraries written in PHP specifically to extend your classes.
A set of basic methods for creating your classes is what you need to quickly create web applications. SINGLETON CSE BASE, позволяет легко и просто создавать singleton класс.
CSE BASE was created for the rapid development of web applications.
CSE Base project:
Below you will find some information on how to init library and perform common commands.
Install
You can find the most recent version of this project here.
Composer
Execute the following command to get the latest version of the package:
Or file composer.json should include the following contents:
Git
Clone this repository locally:
Download
Download the latest release here.
Usage
View test model: ModelSingleton.php
See examples: examples-singleton.php
Create Model Singleton
Examples:
Create INSTANCE singleton
Examples:
Create singleton instance by name:
Restore singleton instance:
EXCEPTIONS singleton
__CLONE:
__SLEEP:
__WAKEUP:
Testing & Code Coverage
PHPUnit is used for unit testing. Unit tests ensure that class and methods does exactly what it is meant to do.
General PHPUnit documentation can be found at https://phpunit.de/documentation.html.
To run the PHPUnit unit tests, execute:
If you want code coverage reports, use the following:
Used PHPUnit default config:
Donating
You can support this project here. You can also help out by contributing to the project, or reporting bugs. Even voicing your suggestions for features is great. Anything to help is much appreciated.
License
The SINGLETON CSE BASE is open-source PHP library licensed under the MIT license. Please see License File for more information.
GitHub @cs-eliseev