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

Dynamic arguments of method in Zephir

Is there a chance to write on zephir something like this


public function get($name)
{
    var_dump($name);
    var_dump(func_get_args());
}

get("hello", "world");

I tryed


public function get(name)
{
    var_dump(name);
    var_dump(func_get_args());
}

get("hello", "world");

but

it throws BadMethodCallException. I'm disappointed a bit.

Can someone help me?



1.5k

As i see in Phalcon 2.0 they don't resolve this issue as well

Di.zep


    public function get(string! name, parameters=null)

So... okay let I going this way too