AbstractSqlExecutor.php
9 months ago
FinalizedSelectExecutor.php
9 months ago
MultiTableDeleteExecutor.php
9 months ago
MultiTableUpdateExecutor.php
9 months ago
PreparedExecutorFinalizer.php
9 months ago
SingleSelectExecutor.php
9 months ago
SingleSelectSqlFinalizer.php
9 months ago
SingleTableDeleteUpdateExecutor.php
9 months ago
SqlFinalizer.php
9 months ago
index.php
9 months ago
AbstractSqlExecutor.php
54 lines
| 1 | <?php |
| 2 | declare (strict_types=1); |
| 3 | namespace MailPoetVendor\Doctrine\ORM\Query\Exec; |
| 4 | if (!defined('ABSPATH')) exit; |
| 5 | use MailPoetVendor\Doctrine\DBAL\Cache\QueryCacheProfile; |
| 6 | use MailPoetVendor\Doctrine\DBAL\Connection; |
| 7 | use MailPoetVendor\Doctrine\DBAL\Result; |
| 8 | use MailPoetVendor\Doctrine\DBAL\Types\Type; |
| 9 | use function array_diff; |
| 10 | use function array_keys; |
| 11 | use function array_map; |
| 12 | use function array_values; |
| 13 | use function str_replace; |
| 14 | abstract class AbstractSqlExecutor |
| 15 | { |
| 16 | protected $_sqlStatements; |
| 17 | protected $sqlStatements; |
| 18 | protected $queryCacheProfile; |
| 19 | public function __construct() |
| 20 | { |
| 21 | // @phpstan-ignore property.deprecated |
| 22 | $this->_sqlStatements =& $this->sqlStatements; |
| 23 | } |
| 24 | public function getSqlStatements() |
| 25 | { |
| 26 | return $this->sqlStatements; |
| 27 | } |
| 28 | public function setQueryCacheProfile(QueryCacheProfile $qcp) : void |
| 29 | { |
| 30 | $this->queryCacheProfile = $qcp; |
| 31 | } |
| 32 | public function removeQueryCacheProfile() : void |
| 33 | { |
| 34 | $this->queryCacheProfile = null; |
| 35 | } |
| 36 | public abstract function execute(Connection $conn, array $params, array $types); |
| 37 | public function __sleep() : array |
| 38 | { |
| 39 | return array_values(array_diff(array_map(static function (string $prop) : string { |
| 40 | return str_replace("\x00*\x00", '', $prop); |
| 41 | }, array_keys((array) $this)), ['_sqlStatements'])); |
| 42 | } |
| 43 | public function __wakeup() : void |
| 44 | { |
| 45 | // @phpstan-ignore property.deprecated |
| 46 | if ($this->_sqlStatements !== null && $this->sqlStatements === null) { |
| 47 | // @phpstan-ignore property.deprecated |
| 48 | $this->sqlStatements = $this->_sqlStatements; |
| 49 | } |
| 50 | // @phpstan-ignore property.deprecated |
| 51 | $this->_sqlStatements =& $this->sqlStatements; |
| 52 | } |
| 53 | } |
| 54 |