HEX
Server: Apache/2
System: Linux server-80-13-140-150.da.direct 5.14.0-362.24.1.el9_3.0.1.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Apr 4 22:31:43 UTC 2024 x86_64
User: cpt (1004)
PHP: 8.1.24
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/cpt/public_html/wp-content/plugins/mailpoet/vendor-prefixed/doctrine/dbal/src/Statement.php
<?php
namespace MailPoetVendor\Doctrine\DBAL;
if (!defined('ABSPATH')) exit;
use MailPoetVendor\Doctrine\DBAL\Platforms\AbstractPlatform;
use MailPoetVendor\Doctrine\DBAL\Types\Type;
use MailPoetVendor\Doctrine\Deprecations\Deprecation;
use function func_num_args;
use function is_string;
class Statement
{
 protected $sql;
 protected $params = [];
 protected $types = [];
 protected $stmt;
 protected $platform;
 protected $conn;
 public function __construct(Connection $conn, Driver\Statement $statement, string $sql)
 {
 $this->conn = $conn;
 $this->stmt = $statement;
 $this->sql = $sql;
 $this->platform = $conn->getDatabasePlatform();
 }
 public function bindValue($param, $value, $type = ParameterType::STRING)
 {
 $this->params[$param] = $value;
 $this->types[$param] = $type;
 $bindingType = ParameterType::STRING;
 if ($type !== null) {
 if (is_string($type)) {
 $type = Type::getType($type);
 }
 $bindingType = $type;
 if ($type instanceof Type) {
 $value = $type->convertToDatabaseValue($value, $this->platform);
 $bindingType = $type->getBindingType();
 }
 }
 try {
 return $this->stmt->bindValue($param, $value, $bindingType);
 } catch (Driver\Exception $e) {
 throw $this->conn->convertException($e);
 }
 }
 public function bindParam($param, &$variable, $type = ParameterType::STRING, $length = null)
 {
 Deprecation::trigger('doctrine/dbal', 'https://github.com/doctrine/dbal/pull/5563', '%s is deprecated. Use bindValue() instead.', __METHOD__);
 $this->params[$param] = $variable;
 $this->types[$param] = $type;
 try {
 if (func_num_args() > 3) {
 return $this->stmt->bindParam($param, $variable, $type, $length);
 }
 return $this->stmt->bindParam($param, $variable, $type);
 } catch (Driver\Exception $e) {
 throw $this->conn->convertException($e);
 }
 }
 public function execute($params = null) : Result
 {
 Deprecation::triggerIfCalledFromOutside('doctrine/dbal', 'https://github.com/doctrine/dbal/pull/4580', '%s() is deprecated, use Statement::executeQuery() or Statement::executeStatement() instead', __METHOD__);
 if ($params !== null) {
 $this->params = $params;
 }
 $logger = $this->conn->getConfiguration()->getSQLLogger();
 if ($logger !== null) {
 $logger->startQuery($this->sql, $this->params, $this->types);
 }
 try {
 return new Result($this->stmt->execute($params), $this->conn);
 } catch (Driver\Exception $ex) {
 throw $this->conn->convertExceptionDuringQuery($ex, $this->sql, $this->params, $this->types);
 } finally {
 if ($logger !== null) {
 $logger->stopQuery();
 }
 }
 }
 public function executeQuery(array $params = []) : Result
 {
 if (func_num_args() > 0) {
 Deprecation::trigger('doctrine/dbal', 'https://github.com/doctrine/dbal/pull/5556', 'Passing $params to Statement::executeQuery() is deprecated. Bind parameters using' . ' Statement::bindParam() or Statement::bindValue() instead.');
 }
 if ($params === []) {
 $params = null;
 // Workaround as long execute() exists and used internally.
 }
 return $this->execute($params);
 }
 public function executeStatement(array $params = []) : int
 {
 if (func_num_args() > 0) {
 Deprecation::trigger('doctrine/dbal', 'https://github.com/doctrine/dbal/pull/5556', 'Passing $params to Statement::executeStatement() is deprecated. Bind parameters using' . ' Statement::bindParam() or Statement::bindValue() instead.');
 }
 if ($params === []) {
 $params = null;
 // Workaround as long execute() exists and used internally.
 }
 return $this->execute($params)->rowCount();
 }
 public function getWrappedStatement()
 {
 return $this->stmt;
 }
}