Use folder structure instead of underscores in filenames
[GitHub/WoltLab/woltlab.github.io.git] / docs / package / pip / core-object.md
1 # Core Object Package Installation Plugin
2
3 Registers `wcf\system\SingletonFactory` objects to be accessible in templates.
4
5 ## Components
6
7 Each item is described as a `<coreobject>` element with the mandatory element `objectname`.
8
9 ### `<objectname>`
10
11 The fully qualified class name of the class.
12
13 ## Example
14
15 ```xml
16 <?xml version="1.0" encoding="UTF-8"?>
17 <data xmlns="http://www.woltlab.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.woltlab.com http://www.woltlab.com/XSD/2019/coreObject.xsd">
18 <import>
19 <coreobject>
20 <objectname>wcf\system\example\ExampleHandler</objectname>
21 </coreobject>
22 </import>
23 </data>
24 ```
25
26 This object can be accessed in templates via `$__wcf->getExampleHandler()` (in general: the method name begins with `get` and ends with the unqualified class name).