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 mixed __construct ( Yiisoft\Db\Driver\Pdo\PdoConnectionInterface $db ) | ||
| $db | Yiisoft\Db\Driver\Pdo\PdoConnectionInterface | |
public function __construct(protected PdoConnectionInterface $db) {}
| public string getTimezone ( boolean $refresh = false ) | ||
| $refresh | boolean | |
public function getTimezone(bool $refresh = false): string
{
throw new NotSupportedException(__METHOD__ . ' is not supported by this DBMS.');
}
| public string getVersion ( ) |
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.