Skip to content
This repository has been archived by the owner on Dec 11, 2022. It is now read-only.

Commit

Permalink
Merge branch 'master' of github.com:sciactive/nymph-server
Browse files Browse the repository at this point in the history
  • Loading branch information
hperrin committed Oct 24, 2017
2 parents e1de131 + c29d931 commit 280c08e
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 26 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "sciactive/nymph-server",
"description": "Powerful object data storage and querying for collaborative web apps.",
"version": "1.6.2",
"time": "2017-10-18",
"version": "2.0.0",
"time": "2017-10-22",
"homepage": "http://nymph.io/",
"type": "library",
"authors": [
Expand Down
25 changes: 14 additions & 11 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

55 changes: 43 additions & 12 deletions src/Drivers/DriverTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,12 @@ public function checkData(
unset($sdata[$cur_value[0]]);
}
if ($key !== 'guid'
&& $key !== '!guid'
// && $key !== '!guid'
&& $key !== 'tag'
&& $key !== '!tag'
// && $key !== '!tag'
&& substr($key, 0, 1) !== '!'
&& !($key === 'data' && $cur_value[1] == false)
// && !($key === '!data' && $cur_value[1] == true)
&& !key_exists($cur_value[0], $data)) {
$pass = false;
} else {
Expand All @@ -136,22 +139,37 @@ public function checkData(
case 'ref':
case '!ref':
$pass = (
$this->entityReferenceSearch(
$data[$cur_value[0]],
$cur_value[1]
(
isset($data[$cur_value[0]])
&& $this->entityReferenceSearch(
$data[$cur_value[0]],
$cur_value[1]
)
)
xor ($type_is_not xor $clause_not));
break;
case 'strict':
case '!strict':
$pass = (
($data[$cur_value[0]] === $cur_value[1])
(
isset($data[$cur_value[0]])
&& $data[$cur_value[0]] === $cur_value[1]
)
xor ($type_is_not xor $clause_not));
break;
case 'data':
case '!data':
$pass = (
($data[$cur_value[0]] == $cur_value[1])
(
(
!isset($data[$cur_value[0]])
&& !$cur_value[1]
)
|| (
isset($data[$cur_value[0]])
&& $data[$cur_value[0]] == $cur_value[1]
)
)
xor ($type_is_not xor $clause_not));
break;
case 'like':
Expand Down Expand Up @@ -234,32 +252,45 @@ public function checkData(
case 'gt':
case '!gt':
$pass = (
($data[$cur_value[0]] > $cur_value[1])
(
isset($data[$cur_value[0]])
&& $data[$cur_value[0]] > $cur_value[1]
)
xor ($type_is_not xor $clause_not));
break;
case 'gte':
case '!gte':
$pass = (
($data[$cur_value[0]] >= $cur_value[1])
(
isset($data[$cur_value[0]])
&& $data[$cur_value[0]] >= $cur_value[1]
)
xor ($type_is_not xor $clause_not));
break;
case 'lt':
case '!lt':
$pass = (
($data[$cur_value[0]] < $cur_value[1])
(
isset($data[$cur_value[0]])
&& $data[$cur_value[0]] < $cur_value[1]
)
xor ($type_is_not xor $clause_not));
break;
case 'lte':
case '!lte':
$pass = (
($data[$cur_value[0]] <= $cur_value[1])
(
isset($data[$cur_value[0]])
&& $data[$cur_value[0]] <= $cur_value[1]
)
xor ($type_is_not xor $clause_not));
break;
case 'array':
case '!array':
$pass = (
(
(array) $data[$cur_value[0]] ===
isset($data[$cur_value[0]])
&& (array) $data[$cur_value[0]] ===
$data[$cur_value[0]]
&& in_array($cur_value[1], $data[$cur_value[0]])
)
Expand Down
2 changes: 1 addition & 1 deletion src/Nymph.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* @link http://nymph.io/
*/
class Nymph {
const VERSION = '1.6.2';
const VERSION = '2.0.0';

public static function __callStatic($name, $args) {
return call_user_func_array(array(RequirePHP::_('Nymph'), $name), $args);
Expand Down

0 comments on commit 280c08e

Please sign in to comment.