public function filterValue($value)
    {
        if ($value instanceof Element\AbstractElement) {
            $name      = $value->getName();
            $type      = $value->getType();
            $realValue = $value->getValue();
        } else {
            $type      = null;
            $name      = null;
            $realValue = $value;
        }
        foreach ($this->filters as $filter) {
            if (((null === $type) || (!in_array($type, $filter['excludeByType']))) &&
                ((null === $name) || (!in_array($name, $filter['excludeByName'])))) {
                if (is_array($realValue)) {
                    foreach ($realValue as $k => $v) {
                        $params        = array_merge([$v], $filter['params']);
                        $realValue[$k] = call_user_func_array($filter['call'], $params);
                    }
                } else {
                    $params    = array_merge([$realValue], $filter['params']);
                    $realValue = call_user_func_array($filter['call'], $params);
                }
            }
        }
        if (($value instanceof Element\AbstractElement) && (null !== $realValue) && ($realValue != '')) {
            $value->setValue($realValue);
        }
        return $realValue;
    }