|
@@ 121-136 (lines=16) @@
|
| 118 |
|
* @param array|null $conditions An array of conditions to set. |
| 119 |
|
* @return array The current global conditions. |
| 120 |
|
*/ |
| 121 |
|
public static function globalConditions($conditions = null) { |
| 122 |
|
if (self::$globalConditions === null) { |
| 123 |
|
self::$globalConditions = []; |
| 124 |
|
} |
| 125 |
|
|
| 126 |
|
if (is_array($conditions)) { |
| 127 |
|
$conditions = array_change_key_case($conditions); |
| 128 |
|
|
| 129 |
|
self::$globalConditions = array_replace( |
| 130 |
|
self::$globalConditions, |
| 131 |
|
$conditions |
| 132 |
|
); |
| 133 |
|
} |
| 134 |
|
|
| 135 |
|
return self::$globalConditions; |
| 136 |
|
} |
| 137 |
|
|
| 138 |
|
/** |
| 139 |
|
* Gets or sets the mappings array that maps parameter names to mappings. |
|
@@ 168-183 (lines=16) @@
|
| 165 |
|
* @param array|null $mappings An array of mappings to set. |
| 166 |
|
* @return array Returns the current global mappings. |
| 167 |
|
*/ |
| 168 |
|
public static function globalMappings($mappings = null) { |
| 169 |
|
if (self::$globalMappings === null) { |
| 170 |
|
self::$globalMappings = []; |
| 171 |
|
} |
| 172 |
|
|
| 173 |
|
if (is_array($mappings)) { |
| 174 |
|
$mappings = array_change_key_case($mappings); |
| 175 |
|
|
| 176 |
|
self::$globalMappings = array_replace( |
| 177 |
|
self::$globalMappings, |
| 178 |
|
$mappings |
| 179 |
|
); |
| 180 |
|
} |
| 181 |
|
|
| 182 |
|
return self::$globalMappings; |
| 183 |
|
} |
| 184 |
|
|
| 185 |
|
/** |
| 186 |
|
* Determine whether or not a parameter is mapped to special request data. |