You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
631 B
28 lines
631 B
<?php
|
|
/** @license MIT
|
|
* Copyright 2021 Dustin Wilson et al.
|
|
* See LICENSE file for details */
|
|
|
|
declare(strict_types=1);
|
|
namespace dW\Lit\Scope;
|
|
|
|
class Selector extends Node {
|
|
protected array $_composites = [];
|
|
protected bool $frozen = false;
|
|
|
|
|
|
public function __construct(?Group $parent = null) {
|
|
$this->_parent = ($parent === null) ? null : \WeakReference::create($parent);
|
|
}
|
|
|
|
|
|
public function add(Composite ...$composites): bool {
|
|
if ($this->frozen) {
|
|
return false;
|
|
}
|
|
|
|
$this->_composites = $composites;
|
|
$this->frozen = true;
|
|
return true;
|
|
}
|
|
}
|
|
|