-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/vendor/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"name": "objement/php-utils", | ||
"description": "PHP Util Classes for Web applications", | ||
"minimum-stability": "stable", | ||
"type": "library", | ||
"authors": [ | ||
{ | ||
"name": "Kevin Glier", | ||
"email": "github@objement.com" | ||
} | ||
], | ||
"require": { | ||
"php": ">=8.0", | ||
"ext-pdo": "*", | ||
"ext-mbstring": "*" | ||
}, | ||
"require-dev": { | ||
"phpunit/phpunit": "^9" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Objement\\OmPhpUtils\\": "source/", | ||
"Objement\\OmPhpUtilsTests\\": "tests/" | ||
} | ||
}, | ||
"scripts": { | ||
"test": "phpunit tests" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
namespace Objement\OmPhpUtils\Exceptions; | ||
|
||
use Exception; | ||
|
||
class OmFilterQuerySqlAdapterFilterGroupExpressionMissingException extends Exception | ||
{ | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
namespace Objement\OmPhpUtils\Exceptions; | ||
|
||
use Exception; | ||
|
||
class OmRequestHandlerException extends Exception | ||
{ | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
|
||
namespace Objement\OmPhpUtils\Exceptions; | ||
|
||
class OmRequestHandlerInvalidDateTimeException extends OmRequestHandlerException | ||
{ | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
|
||
namespace Objement\OmPhpUtils\Exceptions; | ||
|
||
class OmRequestHandlerInvalidEmailException extends OmRequestHandlerException | ||
{ | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
|
||
namespace Objement\OmPhpUtils\Exceptions; | ||
|
||
class OmRequestHandlerInvalidFloatException extends OmRequestHandlerException | ||
{ | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
|
||
namespace Objement\OmPhpUtils\Exceptions; | ||
|
||
class OmRequestHandlerInvalidIntegerException extends OmRequestHandlerException | ||
{ | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
|
||
namespace Objement\OmPhpUtils\Exceptions; | ||
|
||
class OmRequestHandlerInvalidStringException extends OmRequestHandlerException | ||
{ | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
|
||
namespace Objement\OmPhpUtils\Exceptions; | ||
|
||
class OmRequestHandlerOutOfDesiredRangeException extends OmRequestHandlerException | ||
{ | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
|
||
namespace Objement\OmPhpUtils\Exceptions; | ||
|
||
class OmRequestHandlerOutOfDesiredLengthException extends OmRequestHandlerException | ||
{ | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
|
||
namespace Objement\OmPhpUtils\Exceptions; | ||
|
||
class OmRequestHandlerValueNotInWhiteListException extends OmRequestHandlerException | ||
{ | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
namespace Objement\OmPhpUtils\Filters\FilterExpressions; | ||
|
||
class OmAndFilterExpressionGroup implements OmFilterExpressionGroupInterface | ||
{ | ||
private array $expressions; | ||
|
||
/** | ||
* @param OmFilterExpressionInterface[] $expressions | ||
*/ | ||
public function __construct(array $expressions) | ||
{ | ||
$this->expressions = $expressions; | ||
} | ||
|
||
public function getExpressions(): ?array | ||
{ | ||
return $this->expressions; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
namespace Objement\OmPhpUtils\Filters\FilterExpressions; | ||
|
||
class OmBetweenFilterExpressionCondition extends OmFilterExpressionConditionBase | ||
{ | ||
private mixed $max; | ||
private mixed $min; | ||
|
||
public function __construct(string $name, mixed $min, mixed $max) | ||
{ | ||
parent::__construct($name, [$min, $max]); | ||
$this->min = $this->value; | ||
$this->max = $max; | ||
} | ||
|
||
/** | ||
* @return mixed | ||
*/ | ||
public function getMax(): mixed | ||
{ | ||
return $this->max; | ||
} | ||
|
||
/** | ||
* @return mixed | ||
*/ | ||
public function getMin(): mixed | ||
{ | ||
return $this->min; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
|
||
namespace Objement\OmPhpUtils\Filters\FilterExpressions; | ||
|
||
class OmEndsWithFilterExpressionCondition extends OmFilterExpressionConditionBase | ||
{ | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
|
||
namespace Objement\OmPhpUtils\Filters\FilterExpressions; | ||
|
||
class OmEqualsFilterExpressionCondition extends OmFilterExpressionConditionBase | ||
{ | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
namespace Objement\OmPhpUtils\Filters\FilterExpressions; | ||
|
||
abstract class OmFilterExpressionConditionBase implements OmFilterExpressionConditionInterface | ||
{ | ||
protected string $name; | ||
protected mixed $value; | ||
|
||
/** | ||
* @param string $name | ||
* @param mixed $value | ||
*/ | ||
public function __construct(string $name, mixed $value) | ||
{ | ||
$this->name = $name; | ||
$this->value = $value; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getName(): string | ||
{ | ||
return $this->name; | ||
} | ||
|
||
/** | ||
* @return mixed|null | ||
*/ | ||
public function getValue(): mixed | ||
{ | ||
return $this->value; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
namespace Objement\OmPhpUtils\Filters\FilterExpressions; | ||
|
||
interface OmFilterExpressionConditionInterface extends OmFilterExpressionInterface | ||
{ | ||
/** | ||
* @return mixed|null | ||
*/ | ||
public function getValue(): mixed; | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getName(): string; | ||
} |