CRM-14885 - CRM_Core_CodeGen_Main::getTasks - Return instances instead of class names
[civicrm-core.git] / CRM / Core / CodeGen / BaseTask.php
1 <?php
2
3 /**
4 * Class CRM_Core_CodeGen_BaseTask
5 */
6 abstract class CRM_Core_CodeGen_BaseTask implements CRM_Core_CodeGen_ITask {
7 /**
8 * @var CRM_Core_CodeGen_Main
9 */
10 protected $config;
11
12 protected $tables;
13
14 /**
15 * @param CRM_Core_CodeGen_Main $config
16 */
17 public function __construct($config) {
18 $this->setConfig($config);
19 }
20
21 /**
22 * TODO: this is the most rudimentary possible hack. CG config should
23 * eventually be made into a first-class object.
24 *
25 * @param object $config
26 */
27 public function setConfig($config) {
28 $this->config = $config;
29 $this->tables = $this->config->tables;
30 }
31
32 }