コード例 #1
0
ファイル: Reader.php プロジェクト: marviktintor/pos-1
 /**
  * Loads the given meta database
  *
  * @param string $databaseIdentifier
  * @return array<Document>
  */
 protected function _loadMetaDataCollection($databaseIdentifier)
 {
     $path = ConfigurationManager::getSharedInstance()->getConfigurationForKeyPath('dataPath') . $databaseIdentifier . '.meta.json';
     if (!file_exists($path)) {
         return array();
     }
     $lock = Factory::createLock($databaseIdentifier);
     $lock->lock();
     $fileData = file_get_contents($path);
     $lock->unlock();
     //		DebugUtility::printMemorySample();
     $serializer = new JsonSerializer();
     $dataCollection = $serializer->unserialize($fileData);
     //		DebugUtility::printMemorySample();
     return $dataCollection;
 }
コード例 #2
0
ファイル: Writer.php プロジェクト: marviktintor/pos-1
 /**
  * Return a lock for the given database
  *
  * @param string $databaseIdentifier
  * @return \Cundd\PersistentObjectStore\System\Lock\LockInterface
  */
 protected function _getLockForDatabase($databaseIdentifier)
 {
     return Factory::createLock($databaseIdentifier);
 }