1 | <?php |
||
25 | class TypeRegistry |
||
26 | { |
||
27 | |||
28 | /** |
||
29 | * Map of format-name => class-name |
||
30 | * |
||
31 | * @var array |
||
32 | */ |
||
33 | private $formats = array(); |
||
34 | |||
35 | /** |
||
36 | * Add a type name from classname |
||
37 | * |
||
38 | * @param type $classname |
||
39 | */ |
||
40 | public function add($classname) |
||
48 | |||
49 | /** |
||
50 | * Remove type format by explicitely nulling it (disables it) |
||
51 | * |
||
52 | * @param string $name |
||
53 | */ |
||
54 | public function remove($name) |
||
58 | |||
59 | /** |
||
60 | * Is a type format known? |
||
61 | * |
||
62 | * @return bool |
||
63 | */ |
||
64 | public function has($name) |
||
68 | |||
69 | /** |
||
70 | * Get the format class name |
||
71 | * |
||
72 | * @return null|string |
||
73 | */ |
||
74 | public function get($name) |
||
78 | |||
79 | } |
||
80 |