1 | <?php |
||
13 | class TypeRegistry |
||
14 | { |
||
15 | |||
16 | /** |
||
17 | * Map of format-name => class-name |
||
18 | * |
||
19 | * @var array |
||
20 | */ |
||
21 | private $formats = array(); |
||
22 | |||
23 | /** |
||
24 | * Add a type name from classname |
||
25 | * |
||
26 | * @param type $classname |
||
27 | */ |
||
28 | public function add($classname) |
||
36 | |||
37 | /** |
||
38 | * Remove type format by explicitely nulling it (disables it) |
||
39 | * |
||
40 | * @param string $name |
||
41 | */ |
||
42 | public function remove($name) |
||
46 | |||
47 | /** |
||
48 | * Is a type format known? |
||
49 | * |
||
50 | * @return bool |
||
51 | */ |
||
52 | public function has($name) |
||
56 | |||
57 | /** |
||
58 | * Get the format class name |
||
59 | * |
||
60 | * @return null|string |
||
61 | */ |
||
62 | public function get($name) |
||
66 | |||
67 | } |
||
68 |