/** * @param string|Context $child * @return bool */ public function has($child) { if ($child instanceof Context) { return $this->currentContext->hasChild($child); } else { if (is_string($child)) { return $this->currentContext->hasChildByName($child); } else { return false; } } }