1 | <?php |
||
12 | class DynamicPageView extends BasePageView |
||
13 | { |
||
14 | /** @var CollectableItem[] */ |
||
15 | private $collectableItems = []; |
||
16 | |||
17 | /** |
||
18 | * DynamicPageView constructor. |
||
19 | */ |
||
20 | 4 | public function __construct(File $file) |
|
26 | |||
27 | /** |
||
28 | * {@inheritdoc} |
||
29 | */ |
||
30 | 3 | public function getIndexName() |
|
34 | |||
35 | /** |
||
36 | * Add a CollectableItem for this PageView to handle. |
||
37 | */ |
||
38 | 3 | public function addCollectableItem(CollectableItem &$collectable) |
|
43 | |||
44 | /** |
||
45 | * Delete a CollectableItem from this PageView. |
||
46 | */ |
||
47 | public function delCollectableItem(CollectableItem &$collectableItem) |
||
51 | |||
52 | /** |
||
53 | * Get the Collectable Item based on its relative file path. |
||
54 | * |
||
55 | * @param string $relativeFilePath |
||
56 | * |
||
57 | * @return CollectableItem|TemplateReadyDocument|ReadableDocument|null |
||
58 | */ |
||
59 | public function &getCollectableItem($relativeFilePath) |
||
68 | |||
69 | /** |
||
70 | * Check whether or not this DynamicPageView manages a Collectable Item based on its relative path. |
||
71 | * |
||
72 | * @param string $relativeFilePath |
||
73 | * |
||
74 | * @return bool |
||
75 | */ |
||
76 | public function hasCollectableItem($relativeFilePath) |
||
80 | |||
81 | /** |
||
82 | * Get all of the CollectableItems handled by this PageView. |
||
83 | * |
||
84 | * @return CollectableItem[]|TemplateReadyDocument[]|ReadableDocument[] |
||
85 | */ |
||
86 | 2 | public function getCollectableItems() |
|
90 | |||
91 | /** |
||
92 | * Get the namespace this PageView is handling. |
||
93 | * |
||
94 | * @return string |
||
95 | */ |
||
96 | 3 | public function getCollectableNamespace() |
|
107 | } |
||
108 |
Short variable names may make your code harder to understand. Variable names should be self-descriptive. This check looks for variable names who are shorter than a configured minimum.