protected function resolveTransformerForResource($resource)
    {
        $transformer = null;

        if ($this->transformerResolver !== null) {
            $transformer = $this->transformerResolver->resolve($resource);
        }

        return $transformer;
    }
protected function resolveTransformerForResource($resource)
    {
        $transformer = null;

        if ($this->transformerResolver !== null) {
            $transformer = $this->transformerResolver->resolve($resource);
        }

        return $transformer;
    }
protected function resolveTransformerForResource ( $ resource ) { $ transformer = null ; if ( $ this -> transformerResolver !== null ) { $ transformer = $ this -> transformerResolver -> resolve ( $ resource ) ; } return $ transformer ; }
Resolve the transformer to be used for a resource.
Returns an interface, callable or null when a transformer cannot be resolved.

@param $resource

@return TransformerInterface|mixed|null
Resolve the transformer to be used for a resource . Returns an interface callable or null when a transformer cannot be resolved .