1 | <?php |
||
11 | abstract class Datastore implements Datastore_Interface { |
||
12 | /** |
||
13 | * Initialize the datastore. |
||
14 | **/ |
||
15 | public function __construct() { |
||
16 | $this->init(); |
||
17 | } |
||
18 | |||
19 | /** |
||
20 | * Initialization tasks for concrete datastores. |
||
21 | * |
||
22 | * @abstract |
||
23 | **/ |
||
24 | abstract public function init(); |
||
25 | |||
26 | /** |
||
27 | * Create a new datastore of type $type. |
||
28 | * |
||
29 | * @param string $type |
||
30 | * @return Datastore $datastore |
||
31 | **/ |
||
32 | public static function factory( $type ) { |
||
45 | |||
46 | /** |
||
47 | * An alias of factory(). |
||
48 | * |
||
49 | * @see Datastore::factory() |
||
50 | **/ |
||
51 | public static function make( $type ) { |
||
54 | } |
||
55 |