Skip to content

Commit 108ec64

Browse files
committed
Presenter::handleInvalidLink() -> processInvalidLink() (BC break)
1 parent e5d9863 commit 108ec64

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/Application/UI/Component.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ public function link(string $destination, $args = []): string
294294
return $this->getPresenter()->getLinkGenerator()->link($destination, $args, $this, 'link');
295295

296296
} catch (InvalidLinkException $e) {
297-
return $this->getPresenter()->handleInvalidLink($e);
297+
return $this->getPresenter()->processInvalidLink($e);
298298
}
299299
}
300300

src/Application/UI/Presenter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@ protected function requestToUrl(Application\Request $request, ?bool $relative =
829829
* Invalid link handler. Descendant can override this method to change default behaviour.
830830
* @throws InvalidLinkException
831831
*/
832-
protected function handleInvalidLink(InvalidLinkException $e): string
832+
protected function processInvalidLink(InvalidLinkException $e): string
833833
{
834834
if ($this->invalidLinkMode & self::InvalidLinkException) {
835835
throw $e;

src/Bridges/ApplicationDI/ApplicationExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ private function checkPresenter(string $class): void
276276

277277
$re = $class::formatActionMethod('') . '.|' . $class::formatRenderMethod('') . '.|' . $class::formatSignalMethod('') . '.';
278278
foreach ($rc->getMethods() as $rm) {
279-
if (preg_match("#^(?!handleInvalidLink)($re)#", $rm->getName()) && (!$rm->isPublic() || $rm->isStatic())) {
279+
if (preg_match("#^$re#", $rm->getName()) && (!$rm->isPublic() || $rm->isStatic())) {
280280
throw new Nette\InvalidStateException(sprintf('Method %s: this method must be public non-static.', Reflection::toString($rm)));
281281
} elseif (preg_match('#^createComponent.#', $rm->getName()) && ($rm->isPrivate() || $rm->isStatic())) {
282282
throw new Nette\InvalidStateException(sprintf('Method %s: this method must be non-private non-static.', Reflection::toString($rm)));

0 commit comments

Comments
 (0)