Skip to content

Commit 9c84fb0

Browse files
committed
Presenter::handleInvalidLink() -> processInvalidLink() (BC break)
1 parent 362c6e9 commit 9c84fb0

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
@@ -293,7 +293,7 @@ public function link(string $destination, $args = []): string
293293
return $this->getPresenter()->getLinkGenerator()->link($destination, $args, $this, 'link');
294294

295295
} catch (InvalidLinkException $e) {
296-
return $this->getPresenter()->handleInvalidLink($e);
296+
return $this->getPresenter()->processInvalidLink($e);
297297
}
298298
}
299299

src/Application/UI/Presenter.php

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

src/Bridges/ApplicationDI/ApplicationExtension.php

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

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

0 commit comments

Comments
 (0)