@@ -16,9 +16,9 @@ |
||
| 16 | 16 | } |
| 17 | 17 | |
| 18 | 18 | public function getDefaultStreamEditMediaUri($entity, ResourceType $resourceType, ResourceStreamInfo $resourceStreamInfo = null, IOperationContext $operationContext, $relativeUri = null){ |
| 19 | - if(null == $resourceStreamInfo){ |
|
| 20 | - return $relativeUri . '/$value'; |
|
| 21 | - } |
|
| 19 | + if(null == $resourceStreamInfo){ |
|
| 20 | + return $relativeUri . '/$value'; |
|
| 21 | + } |
|
| 22 | 22 | return $resourceStreamInfo->getName(); |
| 23 | 23 | |
| 24 | 24 | } |
@@ -15,8 +15,8 @@ discard block |
||
| 15 | 15 | return $entity->$name; |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | - public function getDefaultStreamEditMediaUri($entity, ResourceType $resourceType, ResourceStreamInfo $resourceStreamInfo = null, IOperationContext $operationContext, $relativeUri = null){ |
|
| 19 | - if(null == $resourceStreamInfo){ |
|
| 18 | + public function getDefaultStreamEditMediaUri($entity, ResourceType $resourceType, ResourceStreamInfo $resourceStreamInfo = null, IOperationContext $operationContext, $relativeUri = null) { |
|
| 19 | + if (null == $resourceStreamInfo) { |
|
| 20 | 20 | return $relativeUri . '/$value'; |
| 21 | 21 | } |
| 22 | 22 | return $resourceStreamInfo->getName(); |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | ResourceStreamInfo $resourceStreamInfo = null, |
| 34 | 34 | IOperationContext $operationContext |
| 35 | 35 | ) { |
| 36 | - if(null == $resourceStreamInfo){ |
|
| 36 | + if (null == $resourceStreamInfo) { |
|
| 37 | 37 | return spl_object_hash($entity); |
| 38 | 38 | } |
| 39 | 39 | $name = $resourceStreamInfo->getName(); |
@@ -44,9 +44,9 @@ discard block |
||
| 44 | 44 | public function getReadStreamUri2( |
| 45 | 45 | $entity, |
| 46 | 46 | ResourceStreamInfo $resourceStreamInfo = null, |
| 47 | - IOperationContext $operationContext,$relativeUri=null |
|
| 47 | + IOperationContext $operationContext, $relativeUri = null |
|
| 48 | 48 | ) { |
| 49 | - if(null == $resourceStreamInfo){ |
|
| 49 | + if (null == $resourceStreamInfo) { |
|
| 50 | 50 | return $relativeUri . '/$value'; |
| 51 | 51 | } |
| 52 | 52 | return $relativeUri . '/' . $resourceStreamInfo->getName(); |
@@ -653,8 +653,8 @@ discard block |
||
| 653 | 653 | if ($resourceType->isMediaLinkEntry()) { |
| 654 | 654 | $odataEntry->isMediaLinkEntry = true; |
| 655 | 655 | $streamProvider = $this->getService()->getStreamProvider(); |
| 656 | - $eTag = $streamProvider->getStreamETag2($entryObject,null, $this->service->getOperationContext()); |
|
| 657 | - $readStreamUri = $streamProvider->getReadStreamUri2($entryObject,null , $this->service->getOperationContext(), $relativeUri); |
|
| 656 | + $eTag = $streamProvider->getStreamETag2($entryObject, null, $this->service->getOperationContext()); |
|
| 657 | + $readStreamUri = $streamProvider->getReadStreamUri2($entryObject, null, $this->service->getOperationContext(), $relativeUri); |
|
| 658 | 658 | $mediaContentType = $streamProvider->getStreamContentType2($entryObject, null, $this->service->getOperationContext()); |
| 659 | 659 | $mediaLink = new ODataMediaLink( |
| 660 | 660 | $title, |
@@ -669,9 +669,9 @@ discard block |
||
| 669 | 669 | |
| 670 | 670 | if ($resourceType->hasNamedStream()) { |
| 671 | 671 | foreach ($resourceType->getAllNamedStreams() as $title => $resourceStreamInfo) { |
| 672 | - $eTag = $streamProvider->getStreamETag2($entryObject, $resourceStreamInfo,$this->service->getOperationContext()); |
|
| 672 | + $eTag = $streamProvider->getStreamETag2($entryObject, $resourceStreamInfo, $this->service->getOperationContext()); |
|
| 673 | 673 | $readStreamUri = $streamProvider->getReadStreamUri2($entryObject, $resourceStreamInfo, $this->service->getOperationContext()); |
| 674 | - $mediaContentType = $streamProvider->getStreamContentType2($entryObject, $resourceStreamInfo,$this->service->getOperationContext()); |
|
| 674 | + $mediaContentType = $streamProvider->getStreamContentType2($entryObject, $resourceStreamInfo, $this->service->getOperationContext()); |
|
| 675 | 675 | $mediaLink = new ODataMediaLink( |
| 676 | 676 | $title, |
| 677 | 677 | $streamProvider->getReadStreamUri2($relativeUri, $resourceStreamInfo, $this->service->getOperationContext()), |
@@ -49,9 +49,9 @@ |
||
| 49 | 49 | $result = $request->getTargetResult(); |
| 50 | 50 | $streamInfo = $request->getResourceStreamInfo(); |
| 51 | 51 | $provider = $service->getStreamProviderWrapper(); |
| 52 | - $eTag = $provider->getStreamETag2($result, $streamInfo,$service->getOperationContext()); |
|
| 52 | + $eTag = $provider->getStreamETag2($result, $streamInfo, $service->getOperationContext()); |
|
| 53 | 53 | $service->getHost()->setResponseETag($eTag); |
| 54 | - $responseBody = $provider->getReadStream2($result, $streamInfo,null,null,$service->getOperationContext()); |
|
| 54 | + $responseBody = $provider->getReadStream2($result, $streamInfo, null, null, $service->getOperationContext()); |
|
| 55 | 55 | } else { |
| 56 | 56 | $responseBody = $request->getTargetResult(); |
| 57 | 57 | } |
@@ -627,7 +627,7 @@ |
||
| 627 | 627 | $responseContentType = $this->getStreamProviderWrapper() |
| 628 | 628 | ->getStreamContentType2( |
| 629 | 629 | $request->getTargetResult(), |
| 630 | - $request->getResourceStreamInfo(),$this->getOperationContext() |
|
| 630 | + $request->getResourceStreamInfo(), $this->getOperationContext() |
|
| 631 | 631 | ); |
| 632 | 632 | |
| 633 | 633 | // Note StreamWrapper::getStreamContentType can return NULL if the requested named stream has not |