-
-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possibility to validate callback signature #64
Comments
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
time to time I would like to validate callback signature and/or its return value. In some scenarios you setup hook and such hook invocation may throw
TypeError
lately because of incompatible signature. Another case is that you have to check type of returned value from callback in runtime. Both of such cases could be validated in setup time for example by:Such "signature validation" can by done by PHP typesystem itself by interface:
and it is probably cleaner way but too verbose.
Would you consider to merge such functionality? Or maybe into
Nette\Utils\Validators
?The text was updated successfully, but these errors were encountered: