Skip to content

Commit 8d03660

Browse files
committed
update README.md
1 parent 1bfe838 commit 8d03660

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Prototypes
22
> Dinamically add methods to PHP classes
33
4-
Using this library you can dinamically add methods to classes, as in the following example:
4+
Using this library you can dinamcally add methods to classes, as in the following example:
55
```php
66
use skrtdev\Prototypes\Prototypeable;
77

@@ -21,7 +21,8 @@ Output is `What a nice way to use PHP`
2121

2222
### Main Features
2323

24-
- Closures are binded to the original object, so you can access `$this` inside closures in the same way as you do when writing a normal method for that class.
24+
- Closures are bound to the original object, so you can access `$this` inside closures in the same way as you do when writing a normal method for that class.
25+
- Supports **static** methods too, and you can access `self` and `static` too.
2526
- A native-like `\Error` will be thrown when trying to call a non-existent method.
2627
- A `skrtdev\Prototypes\Exception` will be thrown if class method already exists, is a prototype, class does not exist or isn't Prototypeable (when using `skrtdev\Prototypes\Prototypes::addMethod()`).
2728

@@ -56,5 +57,4 @@ The `Prototypes` class itself is `Prototypeable`, how strange.
5657
- Allow to add all methods of a normal/anonymous class into a Prototypeable one (Using `Reflection`?).
5758
- Add ability to use some kind of [Attributes](https://www.php.net/manual/en/language.attributes.overview.php) to functions, classes and methods in order to add them as methods to a class, instead of manually adding them.
5859
- Add the ability to define prototype methods that has been already defined as prototypes, overwriting them.
59-
- Add the ability to define prototype for **static** methods. (is it useful enough?)
6060
- Add the ability to define prototypes for all the Prototypeable classes. (do you see any use cases?)

0 commit comments

Comments
 (0)