@@ -30,15 +30,15 @@ |
||
| 30 | 30 | public function isCompatibleWith(IType $type) |
| 31 | 31 | { |
| 32 | 32 | switch ($type->getTypeCode()) { |
| 33 | - case TypeCode::BYTE: |
|
| 34 | - case TypeCode::SBYTE: |
|
| 35 | - case TypeCode::INT16: |
|
| 36 | - case TypeCode::INT32: |
|
| 37 | - case TypeCode::INT64: |
|
| 38 | - case TypeCode::SINGLE: |
|
| 39 | - case TypeCode::DOUBLE: |
|
| 40 | - return true; |
|
| 41 | - } |
|
| 33 | + case TypeCode::BYTE: |
|
| 34 | + case TypeCode::SBYTE: |
|
| 35 | + case TypeCode::INT16: |
|
| 36 | + case TypeCode::INT32: |
|
| 37 | + case TypeCode::INT64: |
|
| 38 | + case TypeCode::SINGLE: |
|
| 39 | + case TypeCode::DOUBLE: |
|
| 40 | + return true; |
|
| 41 | + } |
|
| 42 | 42 | |
| 43 | 43 | return false; |
| 44 | 44 | } |
@@ -100,6 +100,6 @@ |
||
| 100 | 100 | */ |
| 101 | 101 | public function convertToOData($value) |
| 102 | 102 | { |
| 103 | - return $value . 'D'; |
|
| 103 | + return $value.'D'; |
|
| 104 | 104 | } |
| 105 | 105 | } |
| 106 | 106 | \ No newline at end of file |
@@ -107,7 +107,7 @@ |
||
| 107 | 107 | */ |
| 108 | 108 | public function convertToOData($value) |
| 109 | 109 | { |
| 110 | - return 'guid\'' . urlencode($value) . '\''; |
|
| 110 | + return 'guid\''.urlencode($value).'\''; |
|
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | /** |
@@ -30,10 +30,10 @@ |
||
| 30 | 30 | public function isCompatibleWith(IType $type) |
| 31 | 31 | { |
| 32 | 32 | switch ($type->getTypeCode()) { |
| 33 | - case TypeCode::BYTE: |
|
| 34 | - case TypeCode::SBYTE: |
|
| 35 | - case TypeCode::INT16: |
|
| 36 | - return true; |
|
| 33 | + case TypeCode::BYTE: |
|
| 34 | + case TypeCode::SBYTE: |
|
| 35 | + case TypeCode::INT16: |
|
| 36 | + return true; |
|
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | return false; |
@@ -30,11 +30,11 @@ |
||
| 30 | 30 | public function isCompatibleWith(IType $type) |
| 31 | 31 | { |
| 32 | 32 | switch ($type->getTypeCode()) { |
| 33 | - case TypeCode::BYTE: |
|
| 34 | - case TypeCode::SBYTE: |
|
| 35 | - case TypeCode::INT16: |
|
| 36 | - case TypeCode::INT32: |
|
| 37 | - return true; |
|
| 33 | + case TypeCode::BYTE: |
|
| 34 | + case TypeCode::SBYTE: |
|
| 35 | + case TypeCode::INT16: |
|
| 36 | + case TypeCode::INT32: |
|
| 37 | + return true; |
|
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | return false; |
@@ -30,12 +30,12 @@ |
||
| 30 | 30 | public function isCompatibleWith(IType $type) |
| 31 | 31 | { |
| 32 | 32 | switch ($type->getTypeCode()) { |
| 33 | - case TypeCode::BYTE: |
|
| 34 | - case TypeCode::SBYTE: |
|
| 35 | - case TypeCode::INT16: |
|
| 36 | - case TypeCode::INT32: |
|
| 37 | - case TypeCode::INT64: |
|
| 38 | - return true; |
|
| 33 | + case TypeCode::BYTE: |
|
| 34 | + case TypeCode::SBYTE: |
|
| 35 | + case TypeCode::INT16: |
|
| 36 | + case TypeCode::INT32: |
|
| 37 | + case TypeCode::INT64: |
|
| 38 | + return true; |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | return false; |
@@ -96,6 +96,6 @@ |
||
| 96 | 96 | */ |
| 97 | 97 | public function convertToOData($value) |
| 98 | 98 | { |
| 99 | - return $value . 'L'; |
|
| 99 | + return $value.'L'; |
|
| 100 | 100 | } |
| 101 | 101 | } |
| 102 | 102 | \ No newline at end of file |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | if ($resourceType->getResourceTypeKind() != ResourceTypeKind::COMPLEX |
| 32 | 32 | && $resourceType->getResourceTypeKind() != ResourceTypeKind::ENTITY |
| 33 | 33 | ) { |
| 34 | - throw new \InvalidArgumentException(Messages::navigationInvalidResourceType() ); |
|
| 34 | + throw new \InvalidArgumentException(Messages::navigationInvalidResourceType()); |
|
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | $this->_resourceType = $resourceType; |
@@ -31,13 +31,13 @@ |
||
| 31 | 31 | public function isCompatibleWith(IType $type) |
| 32 | 32 | { |
| 33 | 33 | switch ($type->getTypeCode()) { |
| 34 | - case TypeCode::BYTE: |
|
| 35 | - case TypeCode::SBYTE: |
|
| 36 | - case TypeCode::INT16: |
|
| 37 | - case TypeCode::INT32: |
|
| 38 | - case TypeCode::INT64: |
|
| 39 | - case TypeCode::SINGLE: |
|
| 40 | - return true; |
|
| 34 | + case TypeCode::BYTE: |
|
| 35 | + case TypeCode::SBYTE: |
|
| 36 | + case TypeCode::INT16: |
|
| 37 | + case TypeCode::INT32: |
|
| 38 | + case TypeCode::INT64: |
|
| 39 | + case TypeCode::SINGLE: |
|
| 40 | + return true; |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | return false; |
@@ -100,6 +100,6 @@ |
||
| 100 | 100 | */ |
| 101 | 101 | public function convertToOData($value) |
| 102 | 102 | { |
| 103 | - return $value . 'F'; |
|
| 103 | + return $value.'F'; |
|
| 104 | 104 | } |
| 105 | 105 | } |
| 106 | 106 | \ No newline at end of file |
@@ -100,6 +100,6 @@ |
||
| 100 | 100 | */ |
| 101 | 101 | public function convertToOData($value) |
| 102 | 102 | { |
| 103 | - return '\'' . str_replace('%27', "''", urlencode(utf8_encode($value))) . '\''; |
|
| 103 | + return '\''.str_replace('%27', "''", urlencode(utf8_encode($value))).'\''; |
|
| 104 | 104 | } |
| 105 | 105 | } |
| 106 | 106 | \ No newline at end of file |
@@ -16,45 +16,45 @@ discard block |
||
| 16 | 16 | interface IQueryProvider |
| 17 | 17 | { |
| 18 | 18 | |
| 19 | - /** |
|
| 20 | - * Indicates if the QueryProvider can handle ordered paging, this means respecting order, skip, and top parameters |
|
| 21 | - * If the query provider can not handle ordered paging, it must return the entire result set and POData will |
|
| 22 | - * perform the ordering and paging |
|
| 23 | - * |
|
| 24 | - * @return Boolean True if the query provider can handle ordered paging, false if POData should perform the paging |
|
| 25 | - */ |
|
| 26 | - public function handlesOrderedPaging(); |
|
| 27 | - |
|
| 28 | - /** |
|
| 29 | - * Gets the expression provider used by to compile OData expressions into expression used by this query provider. |
|
| 30 | - * |
|
| 31 | - * @return IExpressionProvider |
|
| 32 | - */ |
|
| 33 | - public function getExpressionProvider(); |
|
| 34 | - |
|
| 35 | - |
|
| 36 | - /** |
|
| 37 | - * Gets collection of entities belongs to an entity set |
|
| 38 | - * IE: http://host/EntitySet |
|
| 39 | - * http://host/EntitySet?$skip=10&$top=5&filter=Prop gt Value |
|
| 40 | - * |
|
| 41 | - * @param QueryType $queryType indicates if this is a query for a count, entities, or entities with a count |
|
| 42 | - * @param ResourceSet $resourceSet The entity set containing the entities to fetch |
|
| 43 | - * @param FilterInfo $filterInfo represents the $filter parameter of the OData query. NULL if no $filter specified |
|
| 44 | - * @param mixed $orderBy sorted order if we want to get the data in some specific order |
|
| 45 | - * @param int $top number of records which need to be skip |
|
| 46 | - * @param String $skipToken value indicating what records to skip |
|
| 47 | - * |
|
| 48 | - * @return QueryResult |
|
| 49 | - */ |
|
| 50 | - public function getResourceSet( |
|
| 51 | - QueryType $queryType, |
|
| 52 | - ResourceSet $resourceSet, |
|
| 53 | - $filterInfo = null, |
|
| 54 | - $orderBy = null, |
|
| 55 | - $top = null, |
|
| 56 | - $skipToken = null |
|
| 57 | - ); |
|
| 19 | + /** |
|
| 20 | + * Indicates if the QueryProvider can handle ordered paging, this means respecting order, skip, and top parameters |
|
| 21 | + * If the query provider can not handle ordered paging, it must return the entire result set and POData will |
|
| 22 | + * perform the ordering and paging |
|
| 23 | + * |
|
| 24 | + * @return Boolean True if the query provider can handle ordered paging, false if POData should perform the paging |
|
| 25 | + */ |
|
| 26 | + public function handlesOrderedPaging(); |
|
| 27 | + |
|
| 28 | + /** |
|
| 29 | + * Gets the expression provider used by to compile OData expressions into expression used by this query provider. |
|
| 30 | + * |
|
| 31 | + * @return IExpressionProvider |
|
| 32 | + */ |
|
| 33 | + public function getExpressionProvider(); |
|
| 34 | + |
|
| 35 | + |
|
| 36 | + /** |
|
| 37 | + * Gets collection of entities belongs to an entity set |
|
| 38 | + * IE: http://host/EntitySet |
|
| 39 | + * http://host/EntitySet?$skip=10&$top=5&filter=Prop gt Value |
|
| 40 | + * |
|
| 41 | + * @param QueryType $queryType indicates if this is a query for a count, entities, or entities with a count |
|
| 42 | + * @param ResourceSet $resourceSet The entity set containing the entities to fetch |
|
| 43 | + * @param FilterInfo $filterInfo represents the $filter parameter of the OData query. NULL if no $filter specified |
|
| 44 | + * @param mixed $orderBy sorted order if we want to get the data in some specific order |
|
| 45 | + * @param int $top number of records which need to be skip |
|
| 46 | + * @param String $skipToken value indicating what records to skip |
|
| 47 | + * |
|
| 48 | + * @return QueryResult |
|
| 49 | + */ |
|
| 50 | + public function getResourceSet( |
|
| 51 | + QueryType $queryType, |
|
| 52 | + ResourceSet $resourceSet, |
|
| 53 | + $filterInfo = null, |
|
| 54 | + $orderBy = null, |
|
| 55 | + $top = null, |
|
| 56 | + $skipToken = null |
|
| 57 | + ); |
|
| 58 | 58 | |
| 59 | 59 | |
| 60 | 60 | /** |
@@ -68,40 +68,40 @@ discard block |
||
| 68 | 68 | * @return object|null Returns entity instance if found else null |
| 69 | 69 | */ |
| 70 | 70 | public function getResourceFromResourceSet( |
| 71 | - ResourceSet $resourceSet, |
|
| 71 | + ResourceSet $resourceSet, |
|
| 72 | 72 | KeyDescriptor $keyDescriptor |
| 73 | 73 | ); |
| 74 | 74 | |
| 75 | 75 | |
| 76 | - /** |
|
| 77 | - * Get related resource set for a resource |
|
| 78 | - * IE: http://host/EntitySet(1L)/NavigationPropertyToCollection |
|
| 79 | - * http://host/EntitySet?$expand=NavigationPropertyToCollection |
|
| 80 | - * |
|
| 81 | - * @param QueryType $queryType indicates if this is a query for a count, entities, or entities with a count |
|
| 82 | - * @param ResourceSet $sourceResourceSet The entity set containing the source entity |
|
| 83 | - * @param object $sourceEntityInstance The source entity instance. |
|
| 84 | - * @param ResourceSet $targetResourceSet The resource set of containing the target of the navigation property |
|
| 85 | - * @param ResourceProperty $targetProperty The navigation property to retrieve |
|
| 86 | - * @param FilterInfo $filter represents the $filter parameter of the OData query. NULL if no $filter specified |
|
| 87 | - * @param mixed $orderBy sorted order if we want to get the data in some specific order |
|
| 88 | - * @param int $top number of records which need to be skip |
|
| 89 | - * @param String $skip value indicating what records to skip |
|
| 90 | - * |
|
| 91 | - * @return QueryResult |
|
| 92 | - * |
|
| 93 | - */ |
|
| 94 | - public function getRelatedResourceSet( |
|
| 95 | - QueryType $queryType, |
|
| 96 | - ResourceSet $sourceResourceSet, |
|
| 97 | - $sourceEntityInstance, |
|
| 98 | - ResourceSet $targetResourceSet, |
|
| 99 | - ResourceProperty $targetProperty, |
|
| 100 | - $filter = null, |
|
| 101 | - $orderBy = null, |
|
| 102 | - $top = null, |
|
| 103 | - $skip = null |
|
| 104 | - ); |
|
| 76 | + /** |
|
| 77 | + * Get related resource set for a resource |
|
| 78 | + * IE: http://host/EntitySet(1L)/NavigationPropertyToCollection |
|
| 79 | + * http://host/EntitySet?$expand=NavigationPropertyToCollection |
|
| 80 | + * |
|
| 81 | + * @param QueryType $queryType indicates if this is a query for a count, entities, or entities with a count |
|
| 82 | + * @param ResourceSet $sourceResourceSet The entity set containing the source entity |
|
| 83 | + * @param object $sourceEntityInstance The source entity instance. |
|
| 84 | + * @param ResourceSet $targetResourceSet The resource set of containing the target of the navigation property |
|
| 85 | + * @param ResourceProperty $targetProperty The navigation property to retrieve |
|
| 86 | + * @param FilterInfo $filter represents the $filter parameter of the OData query. NULL if no $filter specified |
|
| 87 | + * @param mixed $orderBy sorted order if we want to get the data in some specific order |
|
| 88 | + * @param int $top number of records which need to be skip |
|
| 89 | + * @param String $skip value indicating what records to skip |
|
| 90 | + * |
|
| 91 | + * @return QueryResult |
|
| 92 | + * |
|
| 93 | + */ |
|
| 94 | + public function getRelatedResourceSet( |
|
| 95 | + QueryType $queryType, |
|
| 96 | + ResourceSet $sourceResourceSet, |
|
| 97 | + $sourceEntityInstance, |
|
| 98 | + ResourceSet $targetResourceSet, |
|
| 99 | + ResourceProperty $targetProperty, |
|
| 100 | + $filter = null, |
|
| 101 | + $orderBy = null, |
|
| 102 | + $top = null, |
|
| 103 | + $skip = null |
|
| 104 | + ); |
|
| 105 | 105 | |
| 106 | 106 | /** |
| 107 | 107 | * Gets a related entity instance from an entity set identified by a key |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | * @return object|null Returns entity instance if found else null |
| 117 | 117 | */ |
| 118 | 118 | public function getResourceFromRelatedResourceSet( |
| 119 | - ResourceSet $sourceResourceSet, |
|
| 119 | + ResourceSet $sourceResourceSet, |
|
| 120 | 120 | $sourceEntityInstance, |
| 121 | 121 | ResourceSet $targetResourceSet, |
| 122 | 122 | ResourceProperty $targetProperty, |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | * @return object|null The related resource if found else null |
| 140 | 140 | */ |
| 141 | 141 | public function getRelatedResourceReference( |
| 142 | - ResourceSet $sourceResourceSet, |
|
| 142 | + ResourceSet $sourceResourceSet, |
|
| 143 | 143 | $sourceEntityInstance, |
| 144 | 144 | ResourceSet $targetResourceSet, |
| 145 | 145 | ResourceProperty $targetProperty |