Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lorddashme/php-static-class-interface

A simple package that convert a service class into a static-like class.
https://github.com/lorddashme/php-static-class-interface

facade oop php static

Last synced: 2 months ago
JSON representation

A simple package that convert a service class into a static-like class.

Awesome Lists containing this project

README

        

# PHP Static Class Interface

A simple package that convert a service class into a static-like class.

[![Latest Stable Version](https://img.shields.io/packagist/v/LordDashMe/php-static-class-interface.svg?style=flat-square)](https://packagist.org/packages/LordDashMe/php-static-class-interface) [![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%207.0-8892BF.svg?style=flat-square)](https://php.net/) [![Coverage Status](https://img.shields.io/coveralls/LordDashMe/php-static-class-interface/master.svg?style=flat-square)](https://coveralls.io/github/LordDashMe/php-static-class-interface?branch=master)

## Requirement(s)

- PHP version from 7.0.* up to latest.

## Install

### via Composer

- Use the command below to install the package via composer:

```txt
composer require lorddashme/php-static-class-interface
```

### via Native Way

- You can also use this package without composer, just clone this repository and import all the important class:

```php
testService('ServiceClass'); // echo Hello World ServiceClass!

// And we can now use the Service Class like a "static" class implementation.
ServiceClassFacade::testService('ServiceFacadeClass'); // echo Hello World ServiceFacadeClass!
```

## License

This package is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).