Skip to content

Commit 6b86c9e

Browse files
committed
Merge branch 'master' of github.com:nahid/jsonq
2 parents 9457d05 + 4e7895d commit 6b86c9e

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

src/JsonQueriable.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,21 @@ trait JsonQueriable
4242
*/
4343
protected $_rulesMap = [
4444
'=' => 'equal',
45+
'eq' => 'equal',
4546
'==' => 'exactEqual',
47+
'seq' => 'exactEqual',
4648
'!=' => 'notEqual',
49+
'neq' => 'notEqual',
4750
'!==' => 'notExactEqual',
51+
'sneq' => 'notExactEqual',
4852
'>' => 'greater',
53+
'gt' => 'greater',
4954
'<' => 'less',
55+
'lt' => 'less',
5056
'>=' => 'greaterEqual',
57+
'gte' => 'greaterEqual',
5158
'<=' => 'lessEqual',
59+
'lte' => 'lessEqual',
5260
'in' => 'in',
5361
'notin' => 'notIn',
5462
'null' => 'null',

src/Jsonq.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,18 @@ public function from($node = null)
7373
return $this;
7474
}
7575

76+
/**
77+
* Alias of from() method
78+
*
79+
* @param null $node
80+
* @return $this
81+
* @throws NullValueException
82+
*/
83+
public function at($node = null)
84+
{
85+
return $this->from($node);
86+
}
87+
7688
/**
7789
* getting prepared data
7890
*
@@ -351,7 +363,7 @@ public function nth($index, $object = true)
351363
* @return object|array|null
352364
* @throws ConditionNotAllowedException
353365
*/
354-
public function sortAs($column, $order = 'asc')
366+
public function sortBy($column, $order = 'asc')
355367
{
356368
$this->prepare();
357369

0 commit comments

Comments
 (0)