1 | <?php |
||
22 | class InterwikiLanguageLink { |
||
23 | |||
24 | /** |
||
25 | * @var Title |
||
26 | */ |
||
27 | private $interwikiLink; |
||
28 | |||
29 | /** |
||
30 | * @since 1.0 |
||
31 | * |
||
32 | * @param string $interwikiLink |
||
33 | */ |
||
34 | 6 | public function __construct( $interwikiLink ) { |
|
37 | |||
38 | /** |
||
39 | * @since 1.0 |
||
40 | * |
||
41 | * @return string |
||
42 | */ |
||
43 | 4 | public function getLanguageCode() { |
|
46 | |||
47 | /** |
||
48 | * @since 1.0 |
||
49 | * |
||
50 | * @return Title |
||
51 | */ |
||
52 | 4 | public function getInterwikiReference() { |
|
55 | |||
56 | /** |
||
57 | * @since 1.0 |
||
58 | * |
||
59 | * @return string |
||
60 | */ |
||
61 | 1 | public function getContainerId() { |
|
64 | |||
65 | /** |
||
66 | * @since 1.0 |
||
67 | * |
||
68 | * @return string |
||
69 | */ |
||
70 | 1 | public function getHash() { |
|
73 | |||
74 | /** |
||
75 | * @since 1.0 |
||
76 | * |
||
77 | * @return DataValue |
||
78 | */ |
||
79 | 1 | public function newLanguageDataValue() { |
|
80 | 1 | return DataValueFactory::getInstance()->newDataItemValue( |
|
|
|||
81 | 1 | new DIBlob( $this->getLanguageCode() ), |
|
82 | 1 | new DIProperty( PropertyRegistry::SIL_IWL_LANG ) |
|
83 | ); |
||
84 | } |
||
85 | |||
86 | /** |
||
87 | * @since 1.0 |
||
88 | * |
||
89 | * @return DataValue |
||
90 | */ |
||
91 | 1 | public function newInterwikiReferenceDataValue() { |
|
92 | 1 | return DataValueFactory::getInstance()->newDataItemValue( |
|
93 | 1 | DIWikiPage::newFromTitle( $this->getInterwikiReference() ), |
|
94 | 1 | new DIProperty( PropertyRegistry::SIL_IWL_REF ) |
|
95 | ); |
||
96 | } |
||
97 | |||
98 | /** |
||
99 | * @since 1.0 |
||
100 | * |
||
101 | * @return DIProperty |
||
102 | */ |
||
103 | 1 | public function newContainerProperty() { |
|
106 | |||
107 | } |
||
108 |
This method has been deprecated. The supplier of the class has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.