示例#1
0
 public function __construct($expr, $explain)
 {
     $this->resId = getNextGlobalId();
     $this->expr = $expr;
     $this->color = nextColor();
     $this->explain = '<span style="background-color: #' . sprintf("%'06X", $this->color) . '" class="resource" data-resource-id="$this->resId">' . $explain . "</span>";
 }
示例#2
0
 public function init(Context $context)
 {
     if ($this->inited) {
         throw new \RuntimeException("Already initialized");
     }
     $this->inited = true;
     $this->context = $context;
     parent::__construct($context, getNextGlobalId());
 }
示例#3
0
 /**
  * @param string $mainRef
  */
 public function __construct($mainRef)
 {
     parent::__construct(new Context($mainRef), getNextGlobalId());
     $_SESSION["executors"][$this->getId()] = $this;
 }
 public function __construct(Context $parentCtx, BooleanResource $condition)
 {
     parent::__construct($parentCtx, getNextGlobalId());
     $this->condition = $condition;
     $parentCtx->addChild($this->getContext());
 }