/
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/TypeMap.php
(4587B)
<?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 3.0.0 * @license https://opensource.org/licenses/mit-license.php MIT License */ namespace Cake\Database; /** * Implements default and single-use mappings for columns to their associated types */ class TypeMap { /** * Array with the default fields and the related types this query might contain. * * Used to avoid repetition when calling multiple functions inside this class that * may require a custom type for a specific field. * * @var array<int|string, string> */ protected $_defaults = []; /** * Array with the fields and the related types that override defaults this query might contain * * Used to avoid repetition when calling multiple functions inside this class that * may require a custom type for a specific field. * * @var array<int|string, string> */ protected $_types = []; /** * Creates an instance with the given defaults * * @param array<int|string, string> $defaults The defaults to use. */ public function __construct(array $defaults = []) { $this->setDefaults($defaults); } /** * Configures a map of fields and associated type. * * These values will be used as the default mapping of types for every function * in this instance that supports a `$types` param. * * This method is useful when you want to avoid repeating type definitions * as setting types overwrites the last set of types. * * ### Example * * ``` * $query->setDefaults(['created' => 'datetime', 'is_visible' => 'boolean']); * ``` * * This method will replace all the existing default mappings with the ones provided. * To add into the mappings use `addDefaults()`. * * @param array<int|string, string> $defaults Array where keys are field names / positions and values * are the correspondent type. * @return $this */ public function setDefaults(array $defaults) { $this->_defaults = $defaults; return $this; } /** * Returns the currently configured types. * * @return array<int|string, string> */ public function getDefaults(): array { return $this->_defaults; } /** * Add additional default types into the type map. * * If a key already exists it will not be overwritten. * * @param array<int|string, string> $types The additional types to add. * @return void */ public function addDefaults(array $types): void { $this->_defaults += $types; } /** * Sets a map of fields and their associated types for single-use. * * ### Example * * ``` * $query->setTypes(['created' => 'time']); * ``` * * This method will replace all the existing type maps with the ones provided. * * @param array<int|string, string> $types Array where keys are field names / positions and values * are the correspondent type. * @return $this */ public function setTypes(array $types) { $this->_types = $types; return $this; } /** * Gets a map of fields and their associated types for single-use. * * @return array<int|string, string> */ public function getTypes(): array { return $this->_types; } /** * Returns the type of the given column. If there is no single use type is configured, * the column type will be looked for inside the default mapping. If neither exist, * null will be returned. * * @param string|int $column The type for a given column * @return string|null */ public function type($column): ?string { return $this->_types[$column] ?? $this->_defaults[$column] ?? null; } /** * Returns an array of all types mapped types * * @return array<int|string, string> */ public function toArray(): array { return $this->_types + $this->_defaults; } }
Save
cmd:
run