/** * @param \PDO $connection * @param string $cacheTableName * @param \MToolkit\Core\MObject $parent * @throws \Exception */ public function __construct(\PDO $connection, $cacheTableName = 'MToolkitCache', MObject $parent = null) { parent::__construct($parent); if ($connection->getAttribute(\PDO::ATTR_DRIVER_NAME) != 'sqlite') { throw new \Exception('Invalid database connection, required sqlite, passed ' . $connection->getAttribute(\PDO::ATTR_DRIVER_NAME)); } $this->connection = $connection; $this->cacheTableName = $cacheTableName; $this->init(); }
/** * MFileCache constructor. * @param MObject|null $parent */ public function __construct(MObject $parent = null) { parent::__construct($parent); }