-
Notifications
You must be signed in to change notification settings - Fork 1.9k
docs: fixed typo in view-parser #7844
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
docs: fixed typo in view-parser #7844
Conversation
There is something I observed in the docs for PHP native functions as filters...
The function actually works with/without the backslash |
The |
Then, I suggest it should be clearly stated in the docs, something like a "note", maybe something like this:
WDYT? |
The note is more confusing.
What do you mean by exactly the same? You cannot define All PHP native functions are defined in the global namespace. |
No, @sammyskills is correct.
Yes. In this context, the function name is a callable. CodeIgniter4/system/View/Parser.php Lines 607 to 608 in 411a9bb
The leading |
The section title PHP Native functions as Filters is not accurate. |
That means the section will have to be removed completely, and the |
Co-authored-by: kenjis <[email protected]>
Yes, all values are PHP callables. And the first sample code is not good. public $filters = [
'abs' => '\CodeIgniter\View\Filters::abs',
'capitalize' => '\CodeIgniter\View\Filters::capitalize',
];
|
…is already covered in Custom Filters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome
Description
Fixed typo in view parser docs for:
renderString()
Checklist: