/** * Register a doctrine type to be used in conjunction with a column type of this platform. * * @param string $dbType * @param string $doctrineType */ public function registerDoctrineTypeMapping($dbType, $doctrineType) { if ($this->doctrineTypeMapping === null) { $this->initializeDoctrineTypeMappings(); } if (!Types\Type::hasType($doctrineType)) { throw DBALException::typeNotFound($doctrineType); } $dbType = strtolower($dbType); $this->doctrineTypeMapping[$dbType] = $doctrineType; }
/** * Overrides an already defined type to use a different implementation. * * @param string $name * @param string $className * * @return void * * @throws \Doctrine\DBAL\DBALException */ public static function overrideType($name, $className) { if (!isset(self::$_typesMap[$name])) { throw DBALException::typeNotFound($name); } if (isset(self::$_typeObjects[$name])) { unset(self::$_typeObjects[$name]); } self::$_typesMap[$name] = $className; }