diff --git a/src/Abstract/Model/Connection.php b/src/Abstract/Model/Connection.php index d219c22f..bd584822 100644 --- a/src/Abstract/Model/Connection.php +++ b/src/Abstract/Model/Connection.php @@ -41,6 +41,7 @@ abstract class Connection implements \Yggverse\Yoda\Interface\Model\Connection 'mime', 32 ); + $this->_pool->init( 'data', // 1 Mb default @@ -227,8 +228,13 @@ abstract class Connection implements \Yggverse\Yoda\Interface\Model\Connection return null; } + public function reset(): void + { + $this->_pool->reset(); + } + public function close(): void { - $this->_pool->clean(); + $this->_pool->close(); } } \ No newline at end of file diff --git a/src/Interface/Model/Connection.php b/src/Interface/Model/Connection.php index 545083ca..8db7726d 100644 --- a/src/Interface/Model/Connection.php +++ b/src/Interface/Model/Connection.php @@ -74,5 +74,7 @@ interface Connection public function getLength(): ?int; + public function reset(): void; + public function close(): void; } \ No newline at end of file diff --git a/src/Interface/Model/Pool.php b/src/Interface/Model/Pool.php index b7fd29aa..f03c19fd 100644 --- a/src/Interface/Model/Pool.php +++ b/src/Interface/Model/Pool.php @@ -46,5 +46,7 @@ interface Pool ?string $value = null ): void; - public function clean(): void; + public function reset(): void; + + public function close(): void; } \ No newline at end of file diff --git a/src/Model/Pool.php b/src/Model/Pool.php index 51ba2ea2..52100dcd 100644 --- a/src/Model/Pool.php +++ b/src/Model/Pool.php @@ -127,7 +127,18 @@ class Pool implements \Yggverse\Yoda\Interface\Model\Pool ); } - public function clean(): void + public function reset(): void + { + foreach ($this->_data as $key => $shmop) + { + $this->set( + $key, + null + ); + } + } + + public function close(): void { foreach ($this->_data as $key => $shmop) {