protected function bind_definition_by_softref($ba, $sr) { if ($sr->checked_name() == $this->name) { return $this; } return parent::bind_definition_by_softref($ba, $sr); }
protected function bind_definition_by_softref($ba, $sr) { // scope: is message declaration in this container's scope? if (isset($this->m_msgdecls[$sr->checked_name()])) { return $this->m_msgdecls[$sr->checked_name()]; } // scope: is message declaration in container's parent's scope? if ($this->sr_parent !== null) { $parent = $ba->get_container_by_softref($this->sr_parent); if (!isset($parent)) { throw new CainException($this->file, $this->lineno, "Parent \"{$this->parent_sr->unique_or_name}\" not defined"); } $defn = $parent->bind_definition_by_softref($ba, $sr); if ($defn !== null) { return $defn; } } // scope: is known beyond this container? return parent::bind_definition_by_softref($ba, $sr); }