コード例 #1
0
ファイル: wallDB.php プロジェクト: Avariya/WalDB
 public function __construct(array $conf, $autoSaveAfter = 10)
 {
     parent::__construct();
     $this->walPath = $conf['wal_path'];
     $this->dbPath = $conf['db_file'];
     if (!file_exists($this->dbPath)) {
         touch($this->dbPath);
     }
     $this->maxOps = $autoSaveAfter;
     $this->loadDBFromFile();
     if (file_exists($conf['wal_path'])) {
         //if log file exist
         $this->saveLoggedData($this->dbFileVer);
     } else {
         touch($conf['wal_path']);
         //else create it
     }
 }