You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+36-1Lines changed: 36 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ Are you looking for a tool to generate PHP code for [classes](#classes), [functi
8
8
9
9
<h3>
10
10
11
-
✅ Supports all the latest PHP features like [enums](#enums), [attributes](#attributes), etc.<br>
11
+
✅ Supports all the latest PHP features like [property hooks](#property-hooks), [enums](#enums), [attributes](#attributes), etc.<br>
12
12
✅ Allows you to easily modify [existing classes](#generating-from-existing-ones)<br>
13
13
✅ Output compliant with [PSR-12 / PER coding style](#printer-and-psr-compliance)<br>
14
14
✅ Highly mature, stable, and widely used library
@@ -665,6 +665,41 @@ class Demo
665
665
666
666
<!---->
667
667
668
+
Property Hooks
669
+
--------------
670
+
671
+
You can also define property hooks (represented by the class [PropertyHook](https://api.nette.org/php-generator/master/Nette/PhpGenerator/PropertyHook.html)) for get and set operations, a feature introduced in PHP 8.4:
672
+
673
+
```php
674
+
$class = new Nette\PhpGenerator\ClassType('Demo');
0 commit comments