Skip to content
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

Make view helper more similar to \Zend\Mvc\Controller\Plugin\Params #1

Open
oprokidnev opened this issue Jun 21, 2017 · 1 comment
Open

Comments

@oprokidnev
Copy link

I think, that your helper lacks this invoke method.

    /**
     * Grabs a param from route match by default.
     *
     * @param string $param
     * @param mixed $default
     * @return mixed
     */
    public function __invoke($param = null, $default = null)
    {
        if ($param === null) {
            return $this;
        }
        return $this->fromRoute($param, $default);
    }
@tasmaniski
Copy link
Owner

Yes this feature would be nice to have.
To get default from route, that way it would be little bit easier to write/read code in views...

Are you interested to contribute? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants