protected function resolveSerializer($serializer):SerializerAbstract
    {
        if (is_string($serializer)) {
            $serializer = new $serializer;
        }

        if (! $serializer instanceof SerializerAbstract) {
            throw new InvalidSerializerException();
        }

        return $serializer;
    }
protected function resolveSerializer($serializer):SerializerAbstract
    {
        if (is_string($serializer)) {
            $serializer = new $serializer;
        }

        if (! $serializer instanceof SerializerAbstract) {
            throw new InvalidSerializerException();
        }

        return $serializer;
    }
protected function resolveSerializer ( $ serializer ) : SerializerAbstract { if ( is_string ( $ serializer ) ) { $ serializer = new $ serializer ; } if ( ! $ serializer instanceof SerializerAbstract ) { throw new InvalidSerializerException ( ) ; } return $ serializer ; }
Resolve a serializer instance from the value.

@param  \League\Fractal\Serializer\SerializerAbstract|string $serializer
@return \League\Fractal\Serializer\SerializerAbstract
@throws \Flugg\Responder\Exceptions\InvalidSerializerException
Resolve a serializer instance from the value .