Files
wp-agentic-writer/vendor/symfony/polyfill-php84/Resources/stubs/Pdo/Odbc.php
Dwindi Ramadhana 690991c526 refactor: Cleanup git state - commit all staged changes
Major refactoring cleanup:
- Add new controller architecture (class-controller-*.php)
- Add new settings-v2 UI (views/settings-v2/)
- Add new CSS architecture (agentic-sidebar.css, tokens)
- Add esbuild build pipeline (scripts/build.js, package.json)
- Add composer dependencies (vendor/)
- Add frontend src directory (assets/js/src/index.jsx)
- Add documentation files
- Remove old/obsolete files (class-settings.php, old CSS)

This commits all pending changes from previous refactoring efforts.
2026-06-17 05:27:58 +07:00

42 lines
1.7 KiB
PHP

<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Pdo;
if (\PHP_VERSION_ID < 80400 && \extension_loaded('pdo_odbc')) {
class Odbc extends \PDO
{
public const ATTR_USE_CURSOR_LIBRARY = \PDO::ODBC_ATTR_USE_CURSOR_LIBRARY;
public const ATTR_ASSUME_UTF8 = \PDO::ODBC_ATTR_ASSUME_UTF8;
public const SQL_USE_IF_NEEDED = \PDO::ODBC_SQL_USE_IF_NEEDED;
public const SQL_USE_DRIVER = \PDO::ODBC_SQL_USE_DRIVER;
public const SQL_USE_ODBC = \PDO::ODBC_SQL_USE_ODBC;
public function __construct(string $dsn, ?string $username = null, ?string $password = null, ?array $options = null)
{
parent::__construct($dsn, $username, $password, $options);
if ('odbc' !== $driver = $this->getAttribute(\PDO::ATTR_DRIVER_NAME)) {
throw new \PDOException(\sprintf('Pdo\Odbc::__construct() cannot be used for connecting to the "%s" driver', $driver));
}
}
public static function connect(string $dsn, ?string $username = null, ?string $password = null, ?array $options = null): self
{
try {
return new self($dsn, $username, $password, $options);
} catch (\PDOException $e) {
throw preg_match('/^Pdo\\\\Odbc::__construct\(\) cannot be used for connecting to the "([a-z]+)" driver/', $e->getMessage(), $matches) ? new \PDOException(\sprintf('Pdo\Odbc::connect() cannot be used for connecting to the "%s" driver', $matches[1])) : $e;
}
}
}
}