| Server IP : 34.87.99.72 / Your IP : 216.73.217.31 Web Server : Apache/2.4.46 (Unix) OpenSSL/1.1.1n System : Linux zlock-bitnami-lamp-prod-v2-vm 4.19.0-16-cloud-amd64 #1 SMP Debian 4.19.181-1 (2021-03-19) x86_64 User : bitnami ( 1000) PHP Version : 7.4.18 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /opt/bitnami/apache/htdocs/app/vendor/doctrine/dbal/src/Portability/ |
Upload File : |
<?php
declare(strict_types=1);
namespace Doctrine\DBAL\Portability;
use Doctrine\DBAL\ColumnCase;
use Doctrine\DBAL\Driver as DriverInterface;
use Doctrine\DBAL\Driver\Middleware as MiddlewareInterface;
final class Middleware implements MiddlewareInterface
{
private int $mode;
/** @var 0|ColumnCase::LOWER|ColumnCase::UPPER */
private int $case;
/**
* @param 0|ColumnCase::LOWER|ColumnCase::UPPER $case Determines how the column case will be treated.
* 0: The case will be left as is in the database.
* {@see ColumnCase::LOWER}: The case will be lowercased.
* {@see ColumnCase::UPPER}: The case will be uppercased.
*/
public function __construct(int $mode, int $case)
{
$this->mode = $mode;
$this->case = $case;
}
public function wrap(DriverInterface $driver): DriverInterface
{
if ($this->mode !== 0) {
return new Driver($driver, $this->mode, $this->case);
}
return $driver;
}
}