public function __construct(array $types = array()) { foreach ($types as $name => $type) { $this->registerType($name, $type); } }