Reply to thread

[CODE=php]    protected function getInput($key, $id)

    {

        if (!isset($this->filterCache[$key]))

        {

            $this->filterCache[$key] = $this->inputFilterer->filter($key, 'array');

        }


        return !empty($this->filterCache[$key][$this->contentType][$id]) ? $this->filterCache[$key][$this->contentType][$id] : '';

    }[/CODE]

if the key + content type + content id combo does not exist, it just assumes the default value would be empty string. It would be nice to pass a third argument which can act as a default.


Back
Top Bottom