Commit graph

10 commits

Author SHA1 Message Date
Kunal Mehta
7688e781b1 Add TitleFormatter::getPrefixedDBkey() and implementation
Matches the expected result of Title::getPrefixedDBkey(), and will be
used in LinkCache.

Change-Id: I5ca65d07e2ae28778d060208e2bfe3fc0529992a
2016-05-11 17:54:40 +00:00
Kunal Mehta
9b1f8b4ca3 Add interwiki support to LinkTarget and TitleValue
This adds support to the LinkTarget interface and TitleValue
implementation for having an interwiki component, matching the function
names used in Title.

MediaWikiTitleCodec was updated accordingly.

The motivation behind this change is to be able to fully use LinkTarget
in the Linker rewrite instead of depending upon Title.

Change-Id: I6666b64f0e336aadc7261e7ca87ac2e498c61856
2016-04-26 22:25:28 -07:00
Kunal Mehta
c9d885f3b4 Namespace LinkTarget under MediaWiki\Linker
And add a GPL file header while we're at it.

Change-Id: I15a6f240124c879b21fb655ade1baaebf4f34ffd
2016-04-21 17:19:10 -07:00
addshore
ab66a4427a Use LinkTarget in TitleValue only methods
Change-Id: Iee4b183ae54457d0c6cd3473f9fed3207742b54f
2016-01-29 12:51:52 +01:00
Niklas Laxström
e7470d8994 Add @since to classes and interface in title
Follow-up to 154bcdc63f

Change-Id: I0c1dc41d29cc3b3c1938ed6df6bb11cc1b4a8e8f
2014-12-23 16:47:39 +00:00
umherirrender
768ac15c70 Cleanup some docs (includes/[s-z])
- Swap "$variable type" to "type $variable"
- Added missing types
- Fixed spacing inside docs
- Makes beginning of @param/@return/@var/@throws in capital
- Changed some types to match the more common spelling

Change-Id: Ie419638e909a47aa72a274043604247830ee1a81
2014-07-24 19:43:44 +02:00
umherirrender
7ff005407e Remove colon after @deprecated/@param/@todo/@note
Change-Id: I4e66dad85eecf7e8e03ac760af900395e1bc11b6
2014-07-24 11:30:25 +02:00
Siebrand Mazeland
db2726675c Update formatting of includes/title/
Change-Id: I862dde47b569ca99f098d795e13b1999a33d790b
2014-04-21 09:32:30 +00:00
umherirrender
b45420410f Fixed some @params documentation (includes/*)
Swapped some "$var type" to "type $var" or added missing types
before the $var. Changed some other types to match the more common
spelling. Makes beginning of some text in captial.
Also added some missing @param.

Change-Id: Iced714bca004756b461b66067a49a925a7e3b877
2014-04-19 22:22:20 +02:00
daniel
154bcdc63f Introducing TitleValue
TitleValue is intended to be a light weight alternative to the Title
class. Any operations on TitleValue are implemented in separate
service classes, like TitleFormatter and PageLinkRenderer. See
<https://www.mediawiki.org/wiki/Requests_for_comment/TitleValue>
for more information.

This change updates SpecialCategories and SpecialLinkSearch to use
TitleValue instead of Title, to demonstrate how TitleValue would be
used, and how the necessary services can be injected and applied.

The intention is to improve testability and reusability; these
advantages will however only become apparent with further refactoring
of the respective special pages. This will be done in follow-up
changes.

More work will be needed to migrate essential functionality from
Title and Linker classes into the respective service classes,
MediaWikiTitleCodec and MediaWikiPageLinkRenderer.

Change-Id: I8eef5a165de4ffcacfbc4911fdacdb15d502fff4
2014-03-28 18:42:17 +00:00