- Added a new MsSQL adapter
- Some bugfixes were made within annotations. - Added a new Object Instanciator which allows to manipulate and define how an object from an entity must be instanciated with given value.
This commit is contained in:
1 parent
9df7e65dcf
commit
5bd60129ea
22 files changed
+547
-103
No files matched your search
@@ -2,14 +2,31 @@
|
||||
|
||||
namespace Ulmus\Annotation\Property;
|
||||
|
||||
use Ulmus\Query;
|
||||
|
||||
class Where implements \Ulmus\Annotation\Annotation {
|
||||
|
||||
public array $comparisons = [];
|
||||
|
||||
public function __construct(...$comparisons)
|
||||
public string $field;
|
||||
|
||||
public $value;
|
||||
|
||||
public string $operator;
|
||||
|
||||
public function __construct(? string $field = null, $value = null, ? string $operator = null)
|
||||
{
|
||||
if ( $comparisons ) {
|
||||
$this->comparisons = $comparisons;
|
||||
if ( $field !== null ) {
|
||||
$this->field = $field;
|
||||
}
|
||||
|
||||
if ( $value !== null ) {
|
||||
$this->value = $value;
|
||||
}
|
||||
|
||||
if ( $operator !== null ) {
|
||||
$this->operator = $operator;
|
||||
}
|
||||
else {
|
||||
$this->operator = Query\Where::OPERATOR_EQUAL;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user