diff --git a/src/Database/Type.php b/src/Database/Type.php index 456bfcfd960..75db3e7288e 100644 --- a/src/Database/Type.php +++ b/src/Database/Type.php @@ -121,7 +121,7 @@ public static function build($name) public static function buildAll() { $result = []; - foreach (self::$_types as $name => $type) { + foreach (static::$_types as $name => $type) { $result[$name] = isset(static::$_builtTypes[$name]) ? static::$_builtTypes[$name] : static::build($name); } @@ -153,19 +153,19 @@ public static function set($name, Type $instance) public static function map($type = null, $className = null) { if ($type === null) { - return self::$_types; + return static::$_types; } if (is_array($type)) { - self::$_types = $type; + static::$_types = $type; return null; } if ($className === null) { - return isset(self::$_types[$type]) ? self::$_types[$type] : null; + return isset(static::$_types[$type]) ? static::$_types[$type] : null; } - self::$_types[$type] = $className; - unset(self::$_builtTypes[$type]); + static::$_types[$type] = $className; + unset(static::$_builtTypes[$type]); } /** @@ -175,8 +175,8 @@ public static function map($type = null, $className = null) */ public static function clear() { - self::$_types = []; - self::$_builtTypes = []; + static::$_types = []; + static::$_builtTypes = []; } /** @@ -228,8 +228,8 @@ protected function _basicTypeCast($value) if ($value === null) { return null; } - if (!empty(self::$_basicTypes[$this->_name])) { - $typeInfo = self::$_basicTypes[$this->_name]; + if (!empty(static::$_basicTypes[$this->_name])) { + $typeInfo = static::$_basicTypes[$this->_name]; if (isset($typeInfo['callback'])) { return $typeInfo['callback']($value); }