1 | <?php |
||
5 | abstract class Exportable { |
||
6 | |||
7 | /** |
||
8 | * The directory containing the file containing this class. |
||
9 | * |
||
10 | * @var string |
||
11 | */ |
||
12 | public $dir; |
||
13 | |||
14 | /** |
||
15 | * Machine name |
||
16 | * |
||
17 | * @var string |
||
18 | */ |
||
19 | public $name; |
||
20 | |||
21 | /** |
||
22 | * The namespace for the class. |
||
23 | * |
||
24 | * @var string |
||
25 | */ |
||
26 | public $namespace; |
||
27 | |||
28 | /** |
||
29 | * Description: translatable |
||
30 | * |
||
31 | * @var string |
||
32 | */ |
||
33 | public $description; |
||
34 | |||
35 | /** |
||
36 | * Human readable name, used for titles. Translatable. |
||
37 | * |
||
38 | * @var string |
||
39 | */ |
||
40 | public $title; |
||
41 | |||
42 | /** |
||
43 | * @param $base |
||
44 | * @param $ancestor |
||
45 | * |
||
46 | * @return array |
||
47 | */ |
||
48 | public static function getClasses($base, $ancestor) { |
||
79 | |||
80 | /** |
||
81 | * Singleton protected constructor |
||
82 | */ |
||
83 | public function __construct() { |
||
90 | |||
91 | /** |
||
92 | * Initializer: must be implemented in concrete classes. |
||
93 | * |
||
94 | * Assignment to $this->package_name cannot be factored because it uses a |
||
95 | * per-class magic constant. |
||
96 | * |
||
97 | * @return void |
||
98 | */ |
||
99 | abstract public function init(); |
||
100 | } |
||
101 |