ObjectFilter/ObjectFilter.php
protected function doFilter($object): void
    {
        $clearAll = false;
        $id = spl_object_hash($object);
        array_splice($this->toFilter, array_search($id, $this->toFilter, true), 1);

        if (!$this->isViewGranted($object)) {
            $clearAll = true;
        }

        $ref = new \ReflectionClass($object);

        foreach ($ref->getProperties() as $property) {
            $property->setAccessible(true);
            $fieldVote = new FieldVote($object, $property->getName());
            $value = $property->getValue($object);

            if ($this->isFilterViewGranted($fieldVote, $value, $clearAll)) {
                $value = $this->ofe->filterValue($value);
                $property->setValue($object, $value);
            }
        }
    }
protected function doFilter($object): void
    {
        $clearAll = false;
        $id = spl_object_hash($object);
        array_splice($this->toFilter, array_search($id, $this->toFilter, true), 1);

        if (!$this->isViewGranted($object)) {
            $clearAll = true;
        }

        $ref = new \ReflectionClass($object);

        foreach ($ref->getProperties() as $property) {
            $property->setAccessible(true);
            $fieldVote = new FieldVote($object, $property->getName());
            $value = $property->getValue($object);

            if ($this->isFilterViewGranted($fieldVote, $value, $clearAll)) {
                $value = $this->ofe->filterValue($value);
                $property->setValue($object, $value);
            }
        }
    }
protected function doFilter ( $ object ) : void { $ clearAll = false ; $ id = spl_object_hash ( $ object ) ; array_splice ( $ this -> toFilter , array_search ( $ id , $ this -> toFilter , true ) , 1 ) ; if ( ! $ this -> isViewGranted ( $ object ) ) { $ clearAll = true ; } $ ref = new \ ReflectionClass ( $ object ) ; foreach ( $ ref -> getProperties ( ) as $ property ) { $ property -> setAccessible ( true ) ; $ fieldVote = new FieldVote ( $ object , $ property -> getName ( ) ) ; $ value = $ property -> getValue ( $ object ) ; if ( $ this -> isFilterViewGranted ( $ fieldVote , $ value , $ clearAll ) ) { $ value = $ this -> ofe -> filterValue ( $ value ) ; $ property -> setValue ( $ object , $ value ) ; } } }
Executes the filtering.

@param object $object
Executes the filtering .