/**
  * @param Http\Request\Parameters\Included $included
  */
 protected function filterOutIncludedResources(Included $included)
 {
     if (false === $included->isEmpty()) {
         foreach ($included->get() as $resource => $includeData) {
             foreach ($this->serializationStrategy->getMappings() as $mapping) {
                 $mapping->filteringIncludedResources(true);
                 if (is_array($includeData)) {
                     foreach ($includeData as $subResource) {
                         $this->serializationStrategy->getMappingByAlias($subResource)->addIncludedResource($this->serializationStrategy->getMappingByAlias($resource)->getClassName());
                     }
                     break;
                 }
                 $mapping->addIncludedResource($this->serializationStrategy->getMappingByAlias($resource)->getClassName());
             }
         }
     }
 }
 /**
  * @param Request $request
  */
 private function filterOutIncludedResources(Request $request)
 {
     if ($include = $request->getIncludedRelationships()) {
         foreach ($include as $resource => $includeData) {
             if ($this->serializationStrategy->getMappingByAlias($resource) == null) {
                 continue;
             }
             foreach ($this->serializationStrategy->getMappings() as $mapping) {
                 $mapping->filteringIncludedResources(true);
                 if (is_array($includeData)) {
                     foreach ($includeData as $subResource) {
                         $this->serializationStrategy->getMappingByAlias($subResource)->addIncludedResource($this->serializationStrategy->getMappingByAlias($resource)->getClassName());
                     }
                     break;
                 }
                 $mapping->addIncludedResource($this->serializationStrategy->getMappingByAlias($resource)->getClassName());
             }
         }
     }
 }