Class Yiisoft\Db\Driver\Pdo\PdoServerInfo
| Inheritance | Yiisoft\Db\Driver\Pdo\PdoServerInfo |
|---|---|
| Implements | Yiisoft\Db\Connection\ServerInfoInterface |
Protected Properties
| Property | Type | Description | Defined By |
|---|---|---|---|
| $db | Yiisoft\Db\Driver\Pdo\PdoConnectionInterface | Yiisoft\Db\Driver\Pdo\PdoServerInfo | |
| $version | string|null | Yiisoft\Db\Driver\Pdo\PdoServerInfo |
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | Yiisoft\Db\Driver\Pdo\PdoServerInfo | |
| getTimezone() | Yiisoft\Db\Driver\Pdo\PdoServerInfo | |
| getVersion() | Yiisoft\Db\Driver\Pdo\PdoServerInfo |
Property Details
Method Details
| public __construct( Yiisoft\Db\Driver\Pdo\PdoConnectionInterface $db ): mixed | ||
| $db | Yiisoft\Db\Driver\Pdo\PdoConnectionInterface | |
public function __construct(protected PdoConnectionInterface $db) {}
| public getTimezone( boolean $refresh = false ): string | ||
| $refresh | boolean | |
public function getTimezone(bool $refresh = false): string
{
throw new NotSupportedException(__METHOD__ . ' is not supported by this DBMS.');
}
| public getVersion( ): string |
public function getVersion(): string
{
if ($this->version === null) {
/** @var string */
$this->version = $this->db->getActivePdo()->getAttribute(PDO::ATTR_SERVER_VERSION) ?? '';
}
return $this->version;
}
Signup or Login in order to comment.