- 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.
33 lines
664 B
PHP
33 lines
664 B
PHP
<?php
|
|
|
|
namespace Ulmus\Annotation\Property;
|
|
|
|
use Ulmus\Query;
|
|
|
|
class Where implements \Ulmus\Annotation\Annotation {
|
|
|
|
public string $field;
|
|
|
|
public $value;
|
|
|
|
public string $operator;
|
|
|
|
public function __construct(? string $field = null, $value = null, ? string $operator = null)
|
|
{
|
|
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;
|
|
}
|
|
}
|
|
}
|