Skip to content

Commit 38a8625

Browse files
committed
Rejigged constructor
1 parent bc33343 commit 38a8625

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

src/Cache.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,16 @@ class Cache
3535

3636
/**
3737
* Cache constructor.
38-
* @param IDriver $driver
39-
* @param null $driver_options
38+
* @param $driver
39+
* @param null|array $driver_options
4040
*/
41-
public function __construct(IDriver $driver, $driver_options = null)
41+
public function __construct($driver, $driver_options = null)
4242
{
43-
$this->driver = new $driver($driver_options);
43+
if(!is_null($driver_options))
44+
$this->driver = new $driver($driver_options);
45+
else
46+
$this->driver = new $driver();
47+
4448
$this->items = new PCI($this);
4549
}
4650

0 commit comments

Comments
 (0)