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
+7-18Lines changed: 7 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,7 +88,7 @@ class MyForm extends AbstractForm
88
88
```
89
89
### Controller
90
90
91
-
We annotate the methods which web form validation is required with `@FormValidation`. We can specify form object property name with `name` and failiure method name with `@onFailure`.
91
+
We annotate the methods which web form validation is required with `#[FormValidation]`. We can specify form object property name with `form` and failure method name with `onFailure`.
92
92
93
93
```php
94
94
use Ray\Di\Di\Inject;
@@ -103,18 +103,13 @@ class MyController
103
103
*/
104
104
protected $contactForm;
105
105
106
-
/**
107
-
* @Inject
108
-
* @Named("contact_form")
109
-
*/
110
-
public function setForm(FormInterface $form)
106
+
#[Inject]
107
+
public function setForm(#[Named("contact_form")] FormInterface $form)
0 commit comments