1 | <?php |
||
17 | class PublishItemsJob extends AbstractQueuedJob implements QueuedJob |
||
18 | { |
||
19 | /** |
||
20 | * @param DataObject $rootNodeID |
||
21 | */ |
||
22 | public function __construct($rootNodeID = null) |
||
30 | |||
31 | protected function getRoot() |
||
35 | |||
36 | /** |
||
37 | * Defines the title of the job |
||
38 | * |
||
39 | * @return string |
||
40 | */ |
||
41 | public function getTitle() |
||
49 | |||
50 | /** |
||
51 | * Indicate to the system which queue we think we should be in based |
||
52 | * on how many objects we're going to touch on while processing. |
||
53 | * |
||
54 | * We want to make sure we also set how many steps we think we might need to take to |
||
55 | * process everything - note that this does not need to be 100% accurate, but it's nice |
||
56 | * to give a reasonable approximation |
||
57 | * |
||
58 | * @return int |
||
59 | */ |
||
60 | public function getJobType() |
||
65 | |||
66 | /** |
||
67 | * This is called immediately before a job begins - it gives you a chance |
||
68 | * to initialise job data and make sure everything's good to go |
||
69 | * |
||
70 | * What we're doing in our case is to queue up the list of items we know we need to |
||
71 | * process still (it's not everything - just the ones we know at the moment) |
||
72 | * |
||
73 | * When we go through, we'll constantly add and remove from this queue, meaning |
||
74 | * we never overload it with content |
||
75 | */ |
||
76 | public function setup() |
||
92 | |||
93 | /** |
||
94 | * Lets process a single node, and publish it if necessary |
||
95 | */ |
||
96 | public function process() |
||
138 | } |
||
139 |
Since your code implements the magic setter
_set
, this function will be called for any write access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.Since the property has write access only, you can use the @property-write annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.