We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Determine Actions of Controller

How can I detect that the controller "someController" has action "someAction" without Reflection? Do Phalcon has some mechanisms for it?



98.9k

I think the unique way is use reflection or use method exists:

var_dump(method_exists('someController','someAction'));

https://php.net/manual/fr/function.method-exists.php

Good idea, thanks.