I'm using phalcon 3 and trying to override the default httprequest class and add a default custom filter, something like this:
public function getPut($name = null, $filters = null, $defaultValue = null, $notAllowEmpty = false, $noRecursive = false)
{
return parent::getPut($name, [$filters, function($value){return str_replace(['null', 'undefined'], null, $value);}], $defaultValue, $notAllowEmpty, $noRecursive);
}
This way I don't have to add filters to every place (controller) where i use request->getPut('paramname'). But it doesn't work. Anyone knows how to do it?