1 | <?php |
||
26 | class SciteParserFunction { |
||
27 | |||
28 | /** |
||
29 | * @var ParserData |
||
30 | */ |
||
31 | private $parserData; |
||
32 | |||
33 | /** |
||
34 | * @var NamespaceExaminer |
||
35 | */ |
||
36 | private $namespaceExaminer; |
||
37 | |||
38 | /** |
||
39 | * @var CitationTextTemplateRenderer |
||
40 | */ |
||
41 | private $citationTextTemplateRenderer; |
||
42 | |||
43 | /** |
||
44 | * @var MediaWikiNsContentMapper |
||
45 | */ |
||
46 | private $mediaWikiNsContentMapper; |
||
47 | |||
48 | /** |
||
49 | * @var BibtexProcessor |
||
50 | */ |
||
51 | private $bibtexProcessor; |
||
52 | |||
53 | /** |
||
54 | * @var DataValueFactory |
||
55 | */ |
||
56 | private $dataValueFactory; |
||
57 | |||
58 | /** |
||
59 | * @var boolean |
||
60 | */ |
||
61 | private $strictParserValidationState = true; |
||
62 | |||
63 | /** |
||
64 | * @var array |
||
65 | */ |
||
66 | private $parameters = []; |
||
67 | |||
68 | /** |
||
69 | * @since 1.0 |
||
70 | * |
||
71 | * @param ParserData $parserData |
||
72 | * @param NamespaceExaminer $namespaceExaminer |
||
73 | * @param CitationTextTemplateRenderer $citationTextTemplateRenderer |
||
74 | * @param MediaWikiNsContentMapper $mediaWikiNsContentMapper |
||
75 | * @param BibtexProcessor $bibtexProcessor |
||
76 | */ |
||
77 | 18 | public function __construct( ParserData $parserData, NamespaceExaminer $namespaceExaminer, CitationTextTemplateRenderer $citationTextTemplateRenderer, MediaWikiNsContentMapper $mediaWikiNsContentMapper, BibtexProcessor $bibtexProcessor ) { |
|
85 | |||
86 | /** |
||
87 | * @since 1.0 |
||
88 | * |
||
89 | * @param boolean $strictParserValidationState |
||
90 | */ |
||
91 | 15 | public function setStrictParserValidationState ( $strictParserValidationState ) { |
|
94 | |||
95 | /** |
||
96 | * Identifiers that have a id-property mapping are to be annotated as semantic |
||
97 | * property. The property mapped to an identifier should be maintained |
||
98 | * accordantly with the the expected type it ought to represent |
||
99 | * (e.g. 'url' => 'Has url', with 'Has url' being of [[Has type::URL]]) |
||
100 | * |
||
101 | * Only identifiers used in #scite: that have an appropriate mapping |
||
102 | * will be created as semantic annotation. For example, identifiers important |
||
103 | * for the citation output are not necessarily notable for a semantic |
||
104 | * assignment (e.g. 'pages', 'page reference', or 'available'). |
||
105 | * |
||
106 | * {{#scite:Segon & Booth 2011 |
||
107 | * |type=online |
||
108 | * |author=Segon, M;Booth, C|+sep=; |
||
109 | * |year=2011 |
||
110 | * |title=Bribery: what do Australian managers know and what do they do? |
||
111 | * |journal=Journal of Business Systems, Governance and Ethics |
||
112 | * |volumn=vol. 6, no. 3 |
||
113 | * |pages=15-29 |
||
114 | * |url=http://www.jbsge.vu.edu.au/issues/vol06no3/Segon_&_Booth.pdf |
||
115 | * |available=20 October 2014 |
||
116 | * |template=scite-formatter-online |
||
117 | * }} |
||
118 | * |
||
119 | * OR |
||
120 | * |
||
121 | * {{#scite:Einstein, Podolsky, and Nathan 1935 |
||
122 | * |bibtex=@article{einstein1935can, |
||
123 | * title={Can quantum-mechanical description of physical reality be considered complete?}, |
||
124 | * author={Einstein, Albert and Podolsky, Boris and Rosen, Nathan}, |
||
125 | * journal={Physical review}, |
||
126 | * volume={47}, |
||
127 | * number={10}, |
||
128 | * pages={777}, |
||
129 | * year={1935}, |
||
130 | * publisher={APS} |
||
131 | * } |
||
132 | * |authors=Albert Einstein, Boris Podolsky, Nathan Rosen|+sep=, |
||
133 | * }} |
||
134 | * |
||
135 | * The citation style is determined by the template assigned and stored in |
||
136 | * its own semantic property. To apply for individual formatting rules, use |
||
137 | * |template= |
||
138 | * |
||
139 | * For any free text assignment use, |
||
140 | * |citation text= |
||
141 | * |
||
142 | * @since 1.0 |
||
143 | * |
||
144 | * @param ParserParameterProcessor $parserParameterProcessor |
||
145 | */ |
||
146 | 17 | public function doProcess( ParserParameterProcessor $parserParameterProcessor, PreTextFormatter $preTextFormatter = null ) { |
|
211 | |||
212 | 15 | private function tryToMatchCitationTextByPrecept( ParserParameterProcessor $parserParameterProcessor, $reference, $type = '' ) { |
|
259 | |||
260 | 15 | private function addPropertyValuesFor( ParserParameterProcessor $parserParameterProcessor, $reference ) { |
|
313 | |||
314 | 3 | private function createErrorMessageFor( $messageKey, $arg1 = '', $arg2 = '' ) { |
|
321 | |||
322 | } |
||
323 |
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.