Replies: 2 comments 5 replies
-
I think that manual is wrong. If you use FilterFactory, it will register a known filter, so I think it's good to use it as follows. $source = -123;
$factory = new \Phalcon\Filter\FilterFactory();
$filter = $factory->newInstance();
echo $filter->absint($source); // 123 |
Beta Was this translation helpful? Give feedback.
0 replies
-
The manual was indeed wrong (Thank you @s-ohnishi ) I have corrected it: https://docs.phalcon.io/5.0/en/filter-filter#methods In short, you can use the FilterFactory and get a new filter using |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
``From the manual section: https://docs.phalcon.io/5.0/en/filter-filter#methods
I took the code without modification:
And ran it. The result was an error:
Fatal error: Uncaught Phalcon\Filter\Exception: Filter absint is not registered in ...../phalconFilter.php:7
In fact, I get exactly the same error in the working code as well. But I decided to check it on a standard example. And it doesn't work.
The same error if you enter any other type, such as string, etc.
Details
Beta Was this translation helpful? Give feedback.
All reactions