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

Scope Resolution Operator

Is scope resolution operator (::) available in volt.

If not, what should I do to take constant from another file.



34.6k
Accepted
answer

You can use "constant":

{% set name = constant("Some\Namespace\MyClass::NAME") %}