public function setTransformer($transformer)
    {
        if (!(new \ReflectionClass($transformer))->implementsInterface(TransformerInterface::class)) {
            throw new InvalidTransformer();
        }

        $this->transformer = $transformer;

        return $this;
    }
public function setTransformer($transformer)
    {
        if (!(new \ReflectionClass($transformer))->implementsInterface(TransformerInterface::class)) {
            throw new InvalidTransformer();
        }

        $this->transformer = $transformer;

        return $this;
    }
public function setTransformer ( $ transformer ) { if ( ! ( new \ ReflectionClass ( $ transformer ) ) -> implementsInterface ( TransformerInterface :: class ) ) { throw new InvalidTransformer ( ) ; } $ this -> transformer = $ transformer ; return $ this ; }
Sets transformer to current repository instance.

@param string $transformer

@throws InvalidTransformer

@return static
Sets transformer to current repository instance .