1 | <?php |
||
9 | trait TFBCUtilities |
||
10 | { |
||
11 | /** |
||
12 | * Load view data for additional route, merged with meta if any. |
||
13 | * |
||
14 | * @param string $route to load. |
||
15 | * |
||
16 | * @return array with view data details. |
||
17 | */ |
||
18 | private function getDataForAdditionalRoute($route) |
||
47 | |||
48 | |||
49 | |||
50 | /** |
||
51 | * Parse text, find and update all a href to use baseurl. |
||
52 | * |
||
53 | * @param object &$filtered with text and excerpt to process. |
||
54 | * @param string $baseurl add as baseurl for all relative urls. |
||
55 | * |
||
56 | * @return void. |
||
57 | */ |
||
58 | private function addBaseurl2AnchorUrls(&$filtered, $baseurl) |
||
71 | |||
72 | |||
73 | |||
74 | /** |
||
75 | * Get published date. |
||
76 | * |
||
77 | * @param array $frontmatter with details on dates. |
||
78 | * |
||
79 | * @return integer as time for publish time. |
||
80 | */ |
||
81 | private function getPublishTime($frontmatter) |
||
86 | } |
||
87 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: