Files
ulmus/src/Annotation/Property/Where.php
T
2022-07-18 16:18:29 +00:00

31 lines
741 B
PHP

<?php
namespace Ulmus\Annotation\Property;
use Ulmus\Query;
class Where implements \Notes\Annotation {
public /* stringable */ $field;
public $value;
public string $operator;
public string $condition;
public function __construct(/* ? Stringable */ $field = null, $value = null, ? string $operator = null, ? string $condition = null)
{
if ( $field !== null ) {
$this->field = $field;
}
if ( $value !== null ) {
$this->value = $value;
}
$this->operator = $operator !== null ? $operator : Query\Where::OPERATOR_EQUAL;
$this->condition = $condition !== null ? $condition : Query\Where::CONDITION_AND;
}
}