RefineableCompilerContext.php in Compiler 1.0.x
File
src/RefineableCompilerContext.php
View source
<?php
namespace Drupal\compiler;
class RefineableCompilerContext extends CompilerContext implements RefineableCompilerContextInterface {
public function offsetExists($offset) : bool {
return isset($this->inputs[$offset]);
}
public function &offsetGet($offset) {
if (isset($this->inputs[$offset])) {
return $this->inputs[$offset];
}
}
public function offsetSet($offset, $value) : void {
if (!is_null($offset)) {
$this->inputs[$offset] = $value;
}
else {
$this->inputs[] = $value;
}
}
public function offsetUnset($offset) : void {
unset($this->inputs[$offset]);
}
public function setCompiler(string $compiler) : self {
$this->compiler = $compiler;
return $this;
}
public function setData($data) : self {
$this->data = $data;
return $this;
}
public function setOption(string $name, $value) : self {
$this->options[$name] = $value;
return $this;
}
public function setOptions(array $options) : self {
$this->options = $options;
return $this;
}
}