public function __construct($data, SerializerInterface $serializer) { $this->resources = $this->buildResources($data, $serializer); }