protected function executeTransformerInclude(Scope $scope, $includeKey, $includeDefinition, $data)
    {
        // Transformer explicitly provided an include method
        $transformer = $scope->transformer();
        $method = $includeDefinition['method'];
        if (method_exists($transformer, $method)) {
            return $transformer->$method($data, $scope);
        }

        // Otherwise try handle the include automatically
        return $this->autoWireInclude($includeKey, $includeDefinition, $data);
    }
protected function executeTransformerInclude(Scope $scope, $includeKey, $includeDefinition, $data)
    {
        // Transformer explicitly provided an include method
        $transformer = $scope->transformer();
        $method = $includeDefinition['method'];
        if (method_exists($transformer, $method)) {
            return $transformer->$method($data, $scope);
        }

        // Otherwise try handle the include automatically
        return $this->autoWireInclude($includeKey, $includeDefinition, $data);
    }
protected function executeTransformerInclude ( Scope $ scope , $ includeKey , $ includeDefinition , $ data ) { // Transformer explicitly provided an include method $ transformer = $ scope -> transformer ( ) ; $ method = $ includeDefinition [ 'method' ] ; if ( method_exists ( $ transformer , $ method ) ) { return $ transformer -> $ method ( $ data , $ scope ) ; } // Otherwise try handle the include automatically return $ this -> autoWireInclude ( $ includeKey , $ includeDefinition , $ data ) ; }
Execute the transformer.

@param Scope  $scope
@param string $includeKey
@param array  $includeDefinition
@param mixed  $data

@throws IncludeException

@return ResourceInterface
Execute the transformer .