Merge branch 'develop' into feature/ci

This commit is contained in:
Joby Elliott 2018-08-18 09:46:29 -06:00
commit 82586899e3
6 changed files with 26 additions and 13 deletions

View file

@ -7,8 +7,8 @@
"prefer-stable": true,
"require": {
"php": ">=7.1",
"digraphcms/utilities": "^0.6",
"mofodojodino/profanity-filter": "^1.3"
"mofodojodino/profanity-filter": "^1.3",
"byjoby/flatrr": "dev-master"
},
"require-dev": {
"phpunit/phpunit": "^7",

View file

@ -2,7 +2,7 @@
/* Destructr | https://gitlab.com/byjoby/destructr | MIT License */
namespace Destructr;
use \Digraph\FlatArray\FlatArray;
use \Flatrr\FlatArray;
/**
* Interface for DeStructure Objects (DSOs). These are the class that is

View file

@ -2,7 +2,7 @@
/* Destructr | https://gitlab.com/byjoby/destructr | MIT License */
namespace Destructr;
use Digraph\FlatArray\FlatArrayInterface;
use Flatrr\FlatArrayInterface;
/**
* Interface for DeStructure Objects (DSOs). These are the class that is

View file

@ -6,7 +6,7 @@ use Destructr\Drivers\AbstractDriver;
use Destructr\DSOInterface;
use Destructr\Factory;
use Destructr\Search;
use Digraph\FlatArray\FlatArray;
use Flatrr\FlatArray;
/**
* This driver is for supporting older SQL servers that don't have their own

View file

@ -3,7 +3,6 @@
namespace Destructr\LegacyDrivers;
use Destructr\DSOInterface;
use Digraph\FlatArray\FlatArray;
use Destructr\Factory;
/**

View file

@ -7,9 +7,11 @@ use Destructr\Drivers\DSODriverInterface;
class Search implements \Serializable
{
use \Digraph\Utilities\ValueFunctionTrait;
protected $factory;
protected $where;
protected $order;
protected $limit;
protected $offset;
public function __construct(DSOFactoryInterface &$factory=null)
{
@ -23,22 +25,34 @@ class Search implements \Serializable
public function where(string $set = null) : ?string
{
return $this->valueFunction('where', $set);
if ($set !== null) {
$this->where = $set;
}
return $this->where;
}
public function order(string $set = null) : ?string
{
return $this->valueFunction('order', $set);
if ($set !== null) {
$this->order = $set;
}
return $this->order;
}
public function limit(int $set = null) : ?int
{
return $this->valueFunction('limit', $set);
if ($set !== null) {
$this->limit = $set;
}
return $this->limit;
}
public function offset(int $set = null) : ?int
{
return $this->valueFunction('offset', $set);
if ($set !== null) {
$this->offset = $set;
}
return $this->offset;
}
public function serialize()