diff --git a/composer.json b/composer.json index a0fe501..c3118ff 100644 --- a/composer.json +++ b/composer.json @@ -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", @@ -38,4 +38,4 @@ "Destructr\\": "tests/" } } -} +} \ No newline at end of file diff --git a/src/DSO.php b/src/DSO.php index ccd75dd..870983f 100644 --- a/src/DSO.php +++ b/src/DSO.php @@ -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 diff --git a/src/DSOInterface.php b/src/DSOInterface.php index ba54c93..1de8136 100644 --- a/src/DSOInterface.php +++ b/src/DSOInterface.php @@ -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 diff --git a/src/LegacyDrivers/AbstractLegacyDriver.php b/src/LegacyDrivers/AbstractLegacyDriver.php index 9bcd125..e468eb1 100644 --- a/src/LegacyDrivers/AbstractLegacyDriver.php +++ b/src/LegacyDrivers/AbstractLegacyDriver.php @@ -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 diff --git a/src/LegacyDrivers/SQLiteDriver.php b/src/LegacyDrivers/SQLiteDriver.php index 13da790..851f662 100644 --- a/src/LegacyDrivers/SQLiteDriver.php +++ b/src/LegacyDrivers/SQLiteDriver.php @@ -3,7 +3,6 @@ namespace Destructr\LegacyDrivers; use Destructr\DSOInterface; -use Digraph\FlatArray\FlatArray; use Destructr\Factory; /** diff --git a/src/Search.php b/src/Search.php index e79854c..da72140 100644 --- a/src/Search.php +++ b/src/Search.php @@ -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()