src/Scope.php
protected function filterFieldsets(array $data)
    {
        if (!$this->hasFilterFieldset()) {
            return $data;
        }
        $serializer = $this->manager->getSerializer();
        $requestedFieldset = iterator_to_array($this->getFilterFieldset());
        //Build the array of requested fieldsets with the mandatory serializer fields
        $filterFieldset = array_flip(
            array_merge(
                $serializer->getMandatoryFields(),
                $requestedFieldset
            )
        );
        return array_intersect_key($data, $filterFieldset);
    }
protected function filterFieldsets(array $data)
    {
        if (!$this->hasFilterFieldset()) {
            return $data;
        }
        $serializer = $this->manager->getSerializer();
        $requestedFieldset = iterator_to_array($this->getFilterFieldset());
        //Build the array of requested fieldsets with the mandatory serializer fields
        $filterFieldset = array_flip(
            array_merge(
                $serializer->getMandatoryFields(),
                $requestedFieldset
            )
        );
        return array_intersect_key($data, $filterFieldset);
    }
protected function filterFieldsets ( array $ data ) { if ( ! $ this -> hasFilterFieldset ( ) ) { return $ data ; } $ serializer = $ this -> manager -> getSerializer ( ) ; $ requestedFieldset = iterator_to_array ( $ this -> getFilterFieldset ( ) ) ; //Build the array of requested fieldsets with the mandatory serializer fields $ filterFieldset = array_flip ( array_merge ( $ serializer -> getMandatoryFields ( ) , $ requestedFieldset ) ) ; return array_intersect_key ( $ data , $ filterFieldset ) ; }
Filter the provided data with the requested filter fieldset for
the scope resource

@internal

@param array  $data

@return array
Filter the provided data with the requested filter fieldset for the scope resource