@@ -31,7 +31,7 @@ |
||
| 31 | 31 | { |
| 32 | 32 | return null; |
| 33 | 33 | } |
| 34 | - $data = $this->getArray($array); |
|
| 34 | + $data = $this->getArray($array); |
|
| 35 | 35 | $ssheat = new Spreadsheet(); |
| 36 | 36 | $sheat = $ssheat->getActiveSheet(); |
| 37 | 37 | $keys = array_shift($data); |
@@ -15,12 +15,12 @@ |
||
| 15 | 15 | |
| 16 | 16 | public function open($savePath, $sessionName) |
| 17 | 17 | { |
| 18 | - $this->dataTable = \Flipside\DataSetFactory::getDataTableByNames($this->dataSetName, $this->dataTableName); |
|
| 19 | - if($this->dataTable) |
|
| 20 | - { |
|
| 21 | - return true; |
|
| 22 | - } |
|
| 23 | - return false; |
|
| 18 | + $this->dataTable = \Flipside\DataSetFactory::getDataTableByNames($this->dataSetName, $this->dataTableName); |
|
| 19 | + if($this->dataTable) |
|
| 20 | + { |
|
| 21 | + return true; |
|
| 22 | + } |
|
| 23 | + return false; |
|
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | public function close() |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | $odata = $request->getAttribute('odata', new \Flipside\ODataParams(array())); |
| 109 | 109 | $params = $this->manipulateParameters($request, $odata); |
| 110 | 110 | $areas = $dataTable->read($odata->filter, $odata->select, $odata->top, |
| 111 | - $odata->skip, $odata->orderby, $params); |
|
| 111 | + $odata->skip, $odata->orderby, $params); |
|
| 112 | 112 | if($areas === false) |
| 113 | 113 | { |
| 114 | 114 | $areas = array(); |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | $odata = $request->getAttribute('odata', new \Flipside\ODataParams(array())); |
| 160 | 160 | $filter = $this->getFilterForPrimaryKey($args['name']); |
| 161 | 161 | $areas = $dataTable->read($filter, $odata->select, $odata->top, |
| 162 | - $odata->skip, $odata->orderby); |
|
| 162 | + $odata->skip, $odata->orderby); |
|
| 163 | 163 | if(empty($areas)) |
| 164 | 164 | { |
| 165 | 165 | return $response->withStatus(404); |
@@ -140,9 +140,9 @@ discard block |
||
| 140 | 140 | $case = true; |
| 141 | 141 | } |
| 142 | 142 | if($case) |
| 143 | - { |
|
| 143 | + { |
|
| 144 | 144 | if(class_exists('MongoRegex')) |
| 145 | - { |
|
| 145 | + { |
|
| 146 | 146 | return array($field=>array('$regex'=>new \MongoRegex('/'.$this->var2.'/i'))); |
| 147 | 147 | } |
| 148 | 148 | else |
@@ -236,15 +236,15 @@ discard block |
||
| 236 | 236 | { |
| 237 | 237 | case '=': |
| 238 | 238 | return array($this->var1=>$this->var2); |
| 239 | - case 'substringof': |
|
| 240 | - if(class_exists('MongoRegex')) |
|
| 241 | - { |
|
| 242 | - return array($this->var1=>array('$regex'=>new \MongoRegex('/'.$this->var2.'/i'))); |
|
| 243 | - } |
|
| 244 | - else |
|
| 245 | - { |
|
| 239 | + case 'substringof': |
|
| 240 | + if(class_exists('MongoRegex')) |
|
| 241 | + { |
|
| 242 | + return array($this->var1=>array('$regex'=>new \MongoRegex('/'.$this->var2.'/i'))); |
|
| 243 | + } |
|
| 244 | + else |
|
| 245 | + { |
|
| 246 | 246 | return array($this->var1=>array('$regex'=>new \MongoDB\BSON\Regex($this->var2, 'i'))); |
| 247 | - } |
|
| 247 | + } |
|
| 248 | 248 | case 'indexof': |
| 249 | 249 | return $this->getMongoIndexOfOperator(); |
| 250 | 250 | default: |
@@ -83,7 +83,7 @@ |
||
| 83 | 83 | //The underlying API call gave us back a different content type. Just pass that on... |
| 84 | 84 | return $response; |
| 85 | 85 | } |
| 86 | - $overrides = $request->getAttribute('serializeOverrides'); |
|
| 86 | + $overrides = $request->getAttribute('serializeOverrides'); |
|
| 87 | 87 | if($overrides->has($this->format)) |
| 88 | 88 | { |
| 89 | 89 | return $this->reserializeBody($response, $overrides->get($this->format)); |