New Title::castFromLinkTarget/TitleValue
authorAryeh Gregor <ayg@aryeh.name>
Sun, 14 Apr 2019 08:59:59 +0000 (11:59 +0300)
committerAryeh Gregor <ayg@aryeh.name>
Mon, 15 Apr 2019 13:56:47 +0000 (16:56 +0300)
commit37fcedbb3ff7ebf0ce97b0cc28291a3af1138380
treecd12d450b8238b03fed4c2b0667218309ab882e6
parent4cebf80a894f1bc9f9e2f732c8b78d5237810343
New Title::castFromLinkTarget/TitleValue

These behave the same as newFromLinkTarget/TitleValue, but accept null
as well (and then just return null). This makes things much easier when
converting code from using Title to LinkTarget, because you can wrap in
castFromLinkTarget without adding null checks.

Change-Id: Id61f91d40b81ad226532917c43e51f0b69af712c
includes/Title.php
tests/phpunit/includes/TitleTest.php