1 | <?php |
||
4 | trait orderByInfo |
||
5 | { |
||
6 | /** |
||
7 | * Message to show error when the orderByPathSegments argument found as |
||
8 | * not a non-empty array. |
||
9 | * |
||
10 | * @return string The message |
||
11 | */ |
||
12 | public static function orderByInfoPathSegmentsArgumentShouldBeNonEmptyArray() |
||
16 | |||
17 | /** |
||
18 | * Message to show error when the navigationPropertiesUsedInTheOrderByClause |
||
19 | * argument found as neither null or a non-empty array. |
||
20 | * |
||
21 | * @return string The message |
||
22 | */ |
||
23 | public static function orderByInfoNaviUsedArgumentShouldBeNullOrNonEmptyArray() |
||
27 | |||
28 | /** |
||
29 | * Message to show error when the orderBySubPathSegments argument found as |
||
30 | * not a non-empty array. |
||
31 | * |
||
32 | * @return string The message |
||
33 | */ |
||
34 | public static function orderByPathSegmentOrderBySubPathSegmentArgumentShouldBeNonEmptyArray() |
||
38 | |||
39 | /** |
||
40 | * Format a message to show error when parser failed to resolve a |
||
41 | * property in orderby path. |
||
42 | * |
||
43 | * @param string $resourceTypeName The name of resource type |
||
44 | * @param string $propertyName Sub path segment, that comes after the |
||
45 | * segment of type $resourceTypeName |
||
46 | * |
||
47 | * @return string The formatted message |
||
48 | */ |
||
49 | public static function orderByParserPropertyNotFound($resourceTypeName, $propertyName) |
||
53 | |||
54 | /** |
||
55 | * Format a message to show error when found a bag property used |
||
56 | * in orderby clause. |
||
57 | * |
||
58 | * @param string $bagPropertyName The name of the bag property |
||
59 | * |
||
60 | * @return string The formatted message |
||
61 | */ |
||
62 | public static function orderByParserBagPropertyNotAllowed($bagPropertyName) |
||
66 | |||
67 | /** |
||
68 | * Format a message to show error when found a primitve property used as |
||
69 | * intermediate segment in orderby clause. |
||
70 | * |
||
71 | * @param string $propertyName The name of primitive property |
||
72 | * |
||
73 | * @return string The formatted message |
||
74 | */ |
||
75 | public static function orderByParserPrimitiveAsIntermediateSegment($propertyName) |
||
79 | |||
80 | /** |
||
81 | * Format a message to show error when found binary property used as sort key. |
||
82 | * |
||
83 | * @param string $binaryPropertyName The name of binary property |
||
84 | * |
||
85 | * @return string The formatted message |
||
86 | */ |
||
87 | public static function orderByParserSortByBinaryPropertyNotAllowed($binaryPropertyName) |
||
91 | |||
92 | /** |
||
93 | * Format a message to show error when found a resource set reference |
||
94 | * property in the oriderby clause. |
||
95 | * |
||
96 | * @param string $propertyName The name of resource set reference property |
||
97 | * @param string $definedType Defined type |
||
98 | * |
||
99 | * @return string The formatted message |
||
100 | */ |
||
101 | public static function orderByParserResourceSetReferenceNotAllowed($propertyName, $definedType) |
||
105 | |||
106 | /** |
||
107 | * Format a message to show error when a navigation property is used as |
||
108 | * sort key in orderby clause. |
||
109 | * |
||
110 | * @param string $navigationPropertyName The name of the navigation property |
||
111 | * |
||
112 | * @return string The formatted message |
||
113 | */ |
||
114 | public static function orderByParserSortByNavigationPropertyIsNotAllowed($navigationPropertyName) |
||
118 | |||
119 | /** |
||
120 | * Format a message to show error when a complex property is used as |
||
121 | * sort key in orderby clause. |
||
122 | * |
||
123 | * @param string $complexPropertyName The name of the complex property |
||
124 | * |
||
125 | * @return string The formatted message |
||
126 | */ |
||
127 | public static function orderByParserSortByComplexPropertyIsNotAllowed($complexPropertyName) |
||
131 | |||
132 | /** |
||
133 | * Message to show error when orderby parser found unexpected state. |
||
134 | * |
||
135 | * @return string The error message |
||
136 | */ |
||
137 | public static function orderByParserUnExpectedState() |
||
141 | |||
142 | /** |
||
143 | * Message to show error when orderby parser come across a type |
||
144 | * which is not expected. |
||
145 | * |
||
146 | * @return string The message |
||
147 | */ |
||
148 | public static function orderByParserUnexpectedPropertyType() |
||
152 | |||
153 | /** |
||
154 | * Format a message to show error when the orderby parser fails to |
||
155 | * create an instance of request uri resource type. |
||
156 | * |
||
157 | * @return string The formatted message |
||
158 | */ |
||
159 | public static function orderByParserFailedToCreateDummyObject() |
||
163 | |||
164 | /** |
||
165 | * Format a message to show error when orderby parser failed to |
||
166 | * access some of the properties of dummy object. |
||
167 | * |
||
168 | * @param string $propertyName Property name |
||
169 | * @param string $parentObjectName Parent object name |
||
170 | * |
||
171 | * @return string The formatted message |
||
172 | */ |
||
173 | public static function orderByParserFailedToAccessOrInitializeProperty($propertyName, $parentObjectName) |
||
177 | |||
178 | } |
||
179 |