_name = $name; parent::__construct($ownerGrammarScopeName); } public function get(): ?Pattern { $grammar = GrammarRegistry::get($this->_ownerGrammarScopeName); if ($grammar->repository === null) { return null; } return (isset($grammar->repository[$this->_name])) ? $grammar->repository[$this->_name] : null; } }