/** * Searches for value of $key in this context and the parent context. * Returns the value if found, null if not found. * * @param string $key * * @return mixed */ public function tryGet($key) { if (isset($this->stash[$key])) { return $this->stash[$key]; } if ($this->parent && $this->parent->tryGet($key) !== null) { return $this->parent->tryGet($key); } return null; }
/** * @param PipelineStageContext|null $parentContext */ public function __construct(PipelineStageContext $parentContext = null) { parent::__construct($parentContext); }