|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace SCI; |
|
4
|
|
|
|
|
5
|
|
|
use SMW\Store; |
|
|
|
|
|
|
6
|
|
|
use SMW\NamespaceExaminer; |
|
|
|
|
|
|
7
|
|
|
use SMW\Services\ServicesFactory as ApplicationFactory; |
|
|
|
|
|
|
8
|
|
|
use Onoi\Cache\Cache; |
|
9
|
|
|
use Parser; |
|
|
|
|
|
|
10
|
|
|
|
|
11
|
|
|
/** |
|
12
|
|
|
* @license GNU GPL v2+ |
|
13
|
|
|
* @since 1.0 |
|
14
|
|
|
* |
|
15
|
|
|
* @author mwjames |
|
16
|
|
|
*/ |
|
17
|
|
|
class ReferenceListFactory { |
|
18
|
|
|
|
|
19
|
|
|
/** |
|
20
|
|
|
* @var Store |
|
21
|
|
|
*/ |
|
22
|
|
|
private $store; |
|
23
|
|
|
|
|
24
|
|
|
/** |
|
25
|
|
|
* @var NamespaceExaminer |
|
26
|
|
|
*/ |
|
27
|
|
|
private $namespaceExaminer; |
|
28
|
|
|
|
|
29
|
|
|
/** |
|
30
|
|
|
* @var CitationReferencePositionJournal |
|
31
|
|
|
*/ |
|
32
|
|
|
private $citationReferencePositionJournal; |
|
33
|
|
|
|
|
34
|
|
|
/** |
|
35
|
|
|
* @since 1.0 |
|
36
|
|
|
* |
|
37
|
|
|
* @param Store $store |
|
38
|
|
|
* @param NamespaceExaminer $namespaceExaminer |
|
39
|
|
|
* @param CitationReferencePositionJournal $citationReferencePositionJournal |
|
40
|
|
|
*/ |
|
41
|
12 |
|
public function __construct( Store $store, NamespaceExaminer $namespaceExaminer, CitationReferencePositionJournal $citationReferencePositionJournal ) { |
|
42
|
12 |
|
$this->store = $store; |
|
43
|
12 |
|
$this->namespaceExaminer = $namespaceExaminer; |
|
44
|
12 |
|
$this->citationReferencePositionJournal = $citationReferencePositionJournal; |
|
45
|
12 |
|
} |
|
46
|
|
|
|
|
47
|
|
|
/** |
|
48
|
|
|
* @since 1.0 |
|
49
|
|
|
* |
|
50
|
|
|
* @return ReferenceListOutputRenderer |
|
51
|
|
|
*/ |
|
52
|
11 |
|
public function newReferenceListOutputRenderer() { |
|
53
|
|
|
|
|
54
|
11 |
|
$mwCollaboratorFactory = ApplicationFactory::getInstance()->newMwCollaboratorFactory(); |
|
55
|
11 |
|
$htmlColumnListRenderer = $mwCollaboratorFactory->newHtmlColumnListRenderer(); |
|
56
|
|
|
|
|
57
|
11 |
|
$referenceListOutputRenderer = new ReferenceListOutputRenderer( |
|
58
|
11 |
|
new CitationResourceMatchFinder( $this->store ), |
|
59
|
11 |
|
$this->citationReferencePositionJournal, |
|
60
|
11 |
|
$htmlColumnListRenderer |
|
61
|
|
|
); |
|
62
|
|
|
|
|
63
|
11 |
|
return $referenceListOutputRenderer; |
|
64
|
|
|
} |
|
65
|
|
|
|
|
66
|
|
|
/** |
|
67
|
|
|
* @since 1.0 |
|
68
|
|
|
* |
|
69
|
|
|
* @param MediaWikiContextInteractor $contextInteractor |
|
70
|
|
|
* @param Cache $cache |
|
71
|
|
|
* @param CacheKeyProvider $cacheKeyProvider |
|
72
|
|
|
* @param Options $options |
|
73
|
|
|
* |
|
74
|
|
|
* @return CachedReferenceListOutputRenderer |
|
75
|
|
|
*/ |
|
76
|
10 |
|
public function newCachedReferenceListOutputRenderer( MediaWikiContextInteractor $contextInteractor, Cache $cache, CacheKeyProvider $cacheKeyProvider, Options $options ) { |
|
77
|
|
|
|
|
78
|
10 |
|
$referenceListOutputRenderer = $this->newReferenceListOutputRenderer(); |
|
79
|
|
|
|
|
80
|
10 |
|
$referenceListOutputRenderer->setNumberOfReferenceListColumns( |
|
81
|
10 |
|
$options->get( 'numberOfReferenceListColumns' ) |
|
|
|
|
|
|
82
|
|
|
); |
|
83
|
|
|
|
|
84
|
10 |
|
$referenceListOutputRenderer->setResponsiveMonoColumnCharacterBoundLength( |
|
85
|
10 |
|
$options->get( 'responsiveMonoColumnCharacterBoundLength' ) |
|
|
|
|
|
|
86
|
|
|
); |
|
87
|
|
|
|
|
88
|
10 |
|
$referenceListOutputRenderer->setReferenceListType( |
|
89
|
10 |
|
$options->get( 'referenceListType' ) |
|
90
|
|
|
); |
|
91
|
|
|
|
|
92
|
10 |
|
$referenceListOutputRenderer->setBrowseLinkToCitationResourceVisibility( |
|
93
|
10 |
|
$options->get( 'browseLinkToCitationResource' ) |
|
|
|
|
|
|
94
|
|
|
); |
|
95
|
|
|
|
|
96
|
10 |
|
$referenceListOutputRenderer->setCitationReferenceCaptionFormat( |
|
97
|
10 |
|
$options->get( 'citationReferenceCaptionFormat' ) |
|
|
|
|
|
|
98
|
|
|
); |
|
99
|
|
|
|
|
100
|
10 |
|
$cachedReferenceListOutputRenderer = new CachedReferenceListOutputRenderer( |
|
101
|
10 |
|
$referenceListOutputRenderer, |
|
102
|
10 |
|
$contextInteractor, |
|
103
|
10 |
|
$this->namespaceExaminer, |
|
104
|
10 |
|
$cache, |
|
105
|
10 |
|
$cacheKeyProvider |
|
106
|
|
|
); |
|
107
|
|
|
|
|
108
|
10 |
|
return $cachedReferenceListOutputRenderer; |
|
109
|
|
|
} |
|
110
|
|
|
|
|
111
|
|
|
} |
|
112
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths