protected function filterRow(RowInterface $row): RowInterface
    {
        if (empty($this->getFields())) {
            return $row;
        }
        $fields = array_keys($row->toArray());
        $toDelete = array_diff($fields, $this->getFields());

        foreach ($toDelete as $field) {
            unset($row->$field);
        }
        return $row;
    }
protected function filterRow(RowInterface $row): RowInterface
    {
        if (empty($this->getFields())) {
            return $row;
        }
        $fields = array_keys($row->toArray());
        $toDelete = array_diff($fields, $this->getFields());

        foreach ($toDelete as $field) {
            unset($row->$field);
        }
        return $row;
    }
protected function filterRow ( RowInterface $ row ) : RowInterface { if ( empty ( $ this -> getFields ( ) ) ) { return $ row ; } $ fields = array_keys ( $ row -> toArray ( ) ) ; $ toDelete = array_diff ( $ fields , $ this -> getFields ( ) ) ; foreach ( $ toDelete as $ field ) { unset ( $ row -> $ field ) ; } return $ row ; }
Filter output Row

@param RowInterface $row from database

@return RowInterface
Filter output Row