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

https://github.com/mehedimi/new-instance

Create a new instance of a class and chain method without storing it in a variable.
https://github.com/mehedimi/new-instance

instance php

Last synced: 10 months ago
JSON representation

Create a new instance of a class and chain method without storing it in a variable.

Awesome Lists containing this project

README

          

# New Instance
Create new instance of a class and chain method without storing in variable.

## Installation
To install this package via `composer`, just run the following command on your terminal.
```bash
composer require mehedimi/new-instance
```
## Uses
Just use the `Mehedi\NewInstance\NewInstance` trait in your any PHP class
```php
find();
```
Or you can create singleton instance of any PHP class.
```php