17 private ?Title $oldTalkpage =
null;
18 private ?Title $newTalkpage =
null;
20 private bool $leaveRedirect =
true;
25 $this->invalidPageTitleRename = $e;
28 public function getOldTitle(): Title {
32 public function getNewTitle(): ?Title {
36 public function getOldTalkpage(): ?Title {
37 return $this->oldTalkpage;
40 public function getNewTalkpage(): ?Title {
41 return $this->newTalkpage;
44 public function shouldLeaveRedirect():
bool {
45 return $this->leaveRedirect;
48 public function setLeaveRedirect(
bool $leaveRedirect ):
void {
49 $this->leaveRedirect = $leaveRedirect;
52 public function hasTalkpage():
bool {
53 return $this->oldTalkpage !==
null;
56 public function getRenameErrorCode():
int {
57 return $this->invalidPageTitleRename ?
58 $this->invalidPageTitleRename->getCode() : PageTitleRenamer::NO_ERROR;
61 public function setTalkpage( Title $oldTalkpage, ?Title $newTalkpage ):
void {
62 $this->oldTalkpage = $oldTalkpage;
63 $this->newTalkpage = $newTalkpage;