/
home
/
techb158
/
immovalet.com
/
vendor
/
doctrine
/
dbal
/
src
/
Types
/
/home/techb158/immovalet.com/vendor/doctrine/dbal/src/Types
mkdir
upload
Name
Size
Mode
Actions
ArrayType.php
1612
0644
edit
dl
rm
AsciiStringType.php
606
0644
edit
dl
rm
BigIntType.php
857
0644
edit
dl
rm
BinaryType.php
1347
0644
edit
dl
rm
BlobType.php
1333
0644
edit
dl
rm
BooleanType.php
1018
0644
edit
dl
rm
ConversionException.php
3550
0644
edit
dl
rm
DateImmutableType.php
1555
0644
edit
dl
rm
DateIntervalType.php
1983
0644
edit
dl
rm
DateTimeImmutableType.php
1715
0644
edit
dl
rm
DateTimeType.php
1713
0644
edit
dl
rm
DateTimeTzImmutableType.php
1591
0644
edit
dl
rm
DateTimeTzType.php
2479
0644
edit
dl
rm
DateType.php
1534
0644
edit
dl
rm
DecimalType.php
632
0644
edit
dl
rm
FloatType.php
597
0644
edit
dl
rm
GuidType.php
683
0644
edit
dl
rm
IntegerType.php
852
0644
edit
dl
rm
JsonType.php
1790
0644
edit
dl
rm
ObjectType.php
1540
0644
edit
dl
rm
PhpDateTimeMappingType.php
183
0644
edit
dl
rm
PhpIntegerMappingType.php
163
0644
edit
dl
rm
SimpleArrayType.php
1425
0644
edit
dl
rm
SmallIntType.php
864
0644
edit
dl
rm
StringType.php
483
0644
edit
dl
rm
TextType.php
733
0644
edit
dl
rm
TimeImmutableType.php
1555
0644
edit
dl
rm
TimeType.php
1538
0644
edit
dl
rm
Type.php
8174
0644
edit
dl
rm
TypeRegistry.php
2839
0644
edit
dl
rm
Types.php
1546
0644
edit
dl
rm
VarDateTimeImmutableType.php
1465
0644
edit
dl
rm
VarDateTimeType.php
901
0644
edit
dl
rm
Edit:
/home/techb158/immovalet.com/vendor/doctrine/dbal/src/Types/TypeRegistry.php
(2839B)
<?php declare(strict_types=1); namespace Doctrine\DBAL\Types; use Doctrine\DBAL\Exception; use function array_search; use function in_array; /** * The type registry is responsible for holding a map of all known DBAL types. * The types are stored using the flyweight pattern so that one type only exists as exactly one instance. */ final class TypeRegistry { /** @var array<string, Type> Map of type names and their corresponding flyweight objects. */ private $instances; /** * @param array<string, Type> $instances */ public function __construct(array $instances = []) { $this->instances = $instances; } /** * Finds a type by the given name. * * @throws Exception */ public function get(string $name): Type { if (! isset($this->instances[$name])) { throw Exception::unknownColumnType($name); } return $this->instances[$name]; } /** * Finds a name for the given type. * * @throws Exception */ public function lookupName(Type $type): string { $name = $this->findTypeName($type); if ($name === null) { throw Exception::typeNotRegistered($type); } return $name; } /** * Checks if there is a type of the given name. */ public function has(string $name): bool { return isset($this->instances[$name]); } /** * Registers a custom type to the type map. * * @throws Exception */ public function register(string $name, Type $type): void { if (isset($this->instances[$name])) { throw Exception::typeExists($name); } if ($this->findTypeName($type) !== null) { throw Exception::typeAlreadyRegistered($type); } $this->instances[$name] = $type; } /** * Overrides an already defined type to use a different implementation. * * @throws Exception */ public function override(string $name, Type $type): void { if (! isset($this->instances[$name])) { throw Exception::typeNotFound($name); } if (! in_array($this->findTypeName($type), [$name, null], true)) { throw Exception::typeAlreadyRegistered($type); } $this->instances[$name] = $type; } /** * Gets the map of all registered types and their corresponding type instances. * * @internal * * @return array<string, Type> */ public function getMap(): array { return $this->instances; } private function findTypeName(Type $type): ?string { $name = array_search($type, $this->instances, true); if ($name === false) { return null; } return $name; } }
Save
cmd:
run