https://github.com/dantleech/phpbench2
Playground for PHPBench 2 ideas
https://github.com/dantleech/phpbench2
Last synced: 11 months ago
JSON representation
Playground for PHPBench 2 ideas
- Host: GitHub
- URL: https://github.com/dantleech/phpbench2
- Owner: dantleech
- Created: 2020-01-05T14:40:34.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-07T21:49:45.000Z (over 6 years ago)
- Last Synced: 2025-03-25T17:51:05.805Z (over 1 year ago)
- Language: PHP
- Size: 69.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Invoke
======
[](https://travis-ci.org/dantleech/invoke)
Utility class to create new classes or invoke methods using named arguments.
PHP does not currently support [named
parameters](https://wiki.php.net/rfc/named_params), this utility provides a
convienient way to emulate them.
Installation
------------
Require with composer:
```bash
$ composer require dantleech/invoke
```
Usage
-----
Instantiate a new class:
```php
'value1'
]);
```
Invoke a method:
```php
'value1'
]);
$bar= Invoke::method($foo, 'one', [
'two' => 'bar'
]);
```
Contributing
------------
Pull requests are welcome. For major changes, please open an issue first to
discuss what you would like to change.
Please make sure to update tests as appropriate.
License
-------
[MIT](https://choosealicense.com/licenses/mit/)