Exemplo n.º 1
0
 /**
  * @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();
 }
Exemplo n.º 2
0
 /**
  * MFileCache constructor.
  * @param MObject|null $parent
  */
 public function __construct(MObject $parent = null)
 {
     parent::__construct($parent);
 }