1 | <?php |
||
10 | class URLArrayObject extends ArrayObject { |
||
11 | |||
12 | private $shutDownRegistered = false; |
||
13 | |||
14 | /** |
||
15 | * Adds metadata into all URLs in the array. |
||
16 | * |
||
17 | * @param $urls array of url => priority |
||
18 | * @param $obj DataObject to inject |
||
19 | * |
||
20 | * @return array array of transformed URLs. |
||
21 | */ |
||
22 | public function addObjects($urls, DataObject $dataObject) { |
||
32 | |||
33 | /** |
||
34 | * Extracts the metadata from the queued structure. |
||
35 | * |
||
36 | * @param $url string |
||
37 | * |
||
38 | * @return DataObject represented by the URL. |
||
39 | */ |
||
40 | public function getObject($url) { |
||
54 | |||
55 | /** |
||
56 | * Adds urls to the queue after injecting the objects' metadata. |
||
57 | * |
||
58 | * @param $urls array associative array of url => priority |
||
59 | * @param $dataObject DataObject object to associate the urls with |
||
60 | */ |
||
61 | public function addUrlsOnBehalf(array $urls, DataObject $dataObject) { |
||
64 | |||
65 | /** |
||
66 | * The format of the urls should be array( 'URLSegment' => '50') |
||
67 | * |
||
68 | * @param array $urls |
||
69 | */ |
||
70 | public function addUrls(array $urls) { |
||
107 | |||
108 | protected function excludeFromCache($url) { |
||
121 | |||
122 | /** |
||
123 | * When this class is getting garbage collected, trigger the insert of all |
||
124 | * urls into the database |
||
125 | * |
||
126 | */ |
||
127 | public function destructMethod() { |
||
132 | |||
133 | /** |
||
134 | * This method will insert all URLs that exists in this object into the |
||
135 | * database by calling the StaticPagesQueue |
||
136 | * |
||
137 | * @return type |
||
138 | */ |
||
139 | public function insertIntoDB() { |
||
148 | |||
149 | /** |
||
150 | * Sorts the array on priority, from highest to lowest |
||
151 | * |
||
152 | * @param array $a |
||
153 | * @param array $b |
||
154 | * @return int - signed |
||
155 | */ |
||
156 | protected function sortOnPriority($a, $b) { |
||
162 | |||
163 | // removes the injected _ID and _ClassName get parameters |
||
164 | public static function sanitize_url($url) { |
||
173 | } |
||
174 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.