1 | <?php |
||
20 | class SolrReindexGroupQueuedJob extends SolrReindexQueuedJobBase |
||
21 | { |
||
22 | /** |
||
23 | * Name of index to reindex |
||
24 | * |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $indexName; |
||
28 | |||
29 | /** |
||
30 | * Variant state that this group belongs to |
||
31 | * |
||
32 | * @var type |
||
33 | */ |
||
34 | protected $state; |
||
35 | |||
36 | /** |
||
37 | * Single class name to index |
||
38 | * |
||
39 | * @var string |
||
40 | */ |
||
41 | protected $class; |
||
42 | |||
43 | /** |
||
44 | * Total number of groups |
||
45 | * |
||
46 | * @var int |
||
47 | */ |
||
48 | protected $groups; |
||
49 | |||
50 | /** |
||
51 | * Group index |
||
52 | * |
||
53 | * @var int |
||
54 | */ |
||
55 | protected $group; |
||
56 | |||
57 | public function __construct($indexName = null, $state = null, $class = null, $groups = null, $group = null) |
||
66 | |||
67 | public function getJobData() |
||
80 | |||
81 | public function setJobData($totalSteps, $currentStep, $isComplete, $jobData, $messages) |
||
92 | |||
93 | public function getTitle() |
||
103 | |||
104 | public function process() |
||
123 | } |
||
124 |
The PSR-1: Basic Coding Standard recommends that a file should either introduce new symbols, that is classes, functions, constants or similar, or have side effects. Side effects are anything that executes logic, like for example printing output, changing ini settings or writing to a file.
The idea behind this recommendation is that merely auto-loading a class should not change the state of an application. It also promotes a cleaner style of programming and makes your code less prone to errors, because the logic is not spread out all over the place.
To learn more about the PSR-1, please see the PHP-FIG site on the PSR-1.