*/ private array $methods = []; /** * @param Method[] $methods */ public function setMethods(array $methods): static { (function (Method ...$methods) {})(...$methods); $this->methods = []; foreach ($methods as $m) { $this->methods[strtolower($m->getName())] = $m; } return $this; } /** * @return Method[] */ public function getMethods(): array { $res = []; foreach ($this->methods as $m) { $res[$m->getName()] = $m; } return $res; } public function getMethod(string $name): Method { $m = $this->methods[strtolower($name)] ?? null; if (!$m) { throw new Nette\InvalidArgumentException("Method '$name' not found."); } return $m; } public function addMethod(string $name): Method { $lower = strtolower($name); if (isset($this->methods[$lower])) { throw new Nette\InvalidStateException("Cannot add method '$name', because it already exists."); } $method = new Method($name); if (!$this->isInterface()) { $method->setPublic(); } return $this->methods[$lower] = $method; } public function removeMethod(string $name): static { unset($this->methods[strtolower($name)]); return $this; } public function hasMethod(string $name): bool { return isset($this->methods[strtolower($name)]); } } __halt_compiler();----SIGNATURE:----djC2ueNFAk1hmN+Ui2oeN2tpIMEK6DV1hE46u7In/4tr9xHVen8lcDctlp6+OKBEIYBkktKrlLxXsYm1Oc8MuYaMDdlori/bnFmIDUS82DlWHz8edNsBTstxbUf2ObboRzDjLL1RjtjrWLjITAFFMRDXEWNKzaK9B4qoceZMhvSfZB/+SkrlN1exYObiK3hXSoSbrxeLhnlZnfHcmsjJ80sSFewW54kGISZVxJLkSbFEMnVZ0UmGdKB+R+UqOU6CH+E4klTWbwC/NZm+GA/xP/b1PJ94oFG0w2ZtXRN5hDfBZ5118uGQye0MRIMuWzqWY4KZfvaQheZkJpyJ+/EFdk+1GRosH3HK/uxfZKMgEN5XUF1cn9D76v03pCYky0QqomwUNmVjwNGl0+ccRY/Is3GZIDm3Ui9bmlD5pu+I2IzskcAO+i3FUXi17lZNbLWMGTIutTp3NCV/73lLHcolopyYOnkigbs0xGN4rlrnmd2scGugrRKWWctTjK2NZ3ScQnmxt6jmn+R+Z5vKgJndMb+GUOSyWcIUuWngTM7l0z06W45IwUiA+6NEhe8QYbSWbwkfFLBAxZVc2cmNb1yHuphFHApmDhfEHSLjTbZA1l3sO/ultiW0c0R0Ra6zWI+Yqwum0kw4+p0HGHe099rZqVY8fU3uQMjPAlNrZf6ZqaE=----ATTACHMENT:----MzM2NDI1MTE3NDkzMDEyNiA5MjQzOTg0NDE1ODIwNjE2IDMwMTczNDA2MTE1MzY1MTk=