src/Api/Response/RestResponseBuilder.php
protected function makeTransformerInstance($transformerClass)
    {
        if ($transformerClass instanceof TransformerAbstract) {
            return $transformerClass;
        }

        $instance = app($transformerClass);

        if ( ! ($instance instanceof TransformerAbstract)) {
            throw new \UnexpectedValueException("{$transformerClass} is not a TransformerAbstract");
        }

        return $instance;
    }
protected function makeTransformerInstance($transformerClass)
    {
        if ($transformerClass instanceof TransformerAbstract) {
            return $transformerClass;
        }

        $instance = app($transformerClass);

        if ( ! ($instance instanceof TransformerAbstract)) {
            throw new \UnexpectedValueException("{$transformerClass} is not a TransformerAbstract");
        }

        return $instance;
    }
protected function makeTransformerInstance ( $ transformerClass ) { if ( $ transformerClass instanceof TransformerAbstract ) { return $ transformerClass ; } $ instance = app ( $ transformerClass ) ; if ( ! ( $ instance instanceof TransformerAbstract ) ) { throw new \ UnexpectedValueException ( "{$transformerClass} is not a TransformerAbstract" ) ; } return $ instance ; }
Makes an instance of a fractal transformer.

@param string|TransformerAbstract $transformerClass
@return TransformerAbstract
Makes an instance of a fractal transformer .