public function __construct(array $parts = [], $type = 'AND') { $this->type = strtoupper($type) == 'OR' ? 'OR' : 'AND'; $this->add($parts); }