Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
connection.php
1<?php
9namespace Bitrix\Main\Data;
10
16abstract class Connection
17{
19 protected $resource;
20 protected $isConnected = false;
21 protected $configuration;
22
23 public function __construct(array $configuration)
24 {
25 $this->configuration = $configuration;
26 }
27
31 public function connect()
32 {
33 $this->isConnected = false;
34
35 $this->connectInternal();
36 }
37
41 public function disconnect()
42 {
43 $this->disconnectInternal();
44 }
45
51 public function getResource()
52 {
53 $this->connectInternal();
54 return $this->resource;
55 }
56
62 public function isConnected()
63 {
64 return $this->isConnected;
65 }
66
67 abstract protected function connectInternal();
68 abstract protected function disconnectInternal();
69
75 public function getConfiguration()
76 {
78 }
79
85 public function getMaxAllowedPacket()
86 {
87 return PHP_INT_MAX;
88 }
89}
__construct(array $configuration)