当前位置: 首页>>代码示例>>PHP>>正文


PHP Repository::getUniqueId方法代码示例

本文整理汇总了PHP中Repository::getUniqueId方法的典型用法代码示例。如果您正苦于以下问题:PHP Repository::getUniqueId方法的具体用法?PHP Repository::getUniqueId怎么用?PHP Repository::getUniqueId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Repository的用法示例。


在下文中一共展示了Repository::getUniqueId方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getAccessDriver

 /**
  * @return AjxpWebdavProvider
  * @throws ezcBaseFileNotFoundException
  */
 protected function getAccessDriver()
 {
     if (!isset($this->accessDriver)) {
         $confDriver = ConfService::getConfStorageImpl();
         $this->accessDriver = ConfService::loadRepositoryDriver();
         if (!$this->accessDriver instanceof AjxpWebdavProvider) {
             throw new ezcBaseFileNotFoundException($this->repository->getUniqueId());
         }
         $wrapperData = $this->accessDriver->detectStreamWrapper(true);
         $this->wrapperClassName = $wrapperData["classname"];
     }
     return $this->accessDriver;
 }
开发者ID:crodriguezn,项目名称:administrator-files,代码行数:17,代码来源:class.AJXP_WebdavBackend.php

示例2: saveRepository

 /**
  * Store a newly created repository 
  *
  * @param Repository $repositoryObject
  * @param Boolean $update 
  * @return -1 if failed
  */
 function saveRepository($repositoryObject, $update = false)
 {
     $repositories = Utils::loadSerialFile($this->repoSerialFile);
     if (!$update) {
         $repositoryObject->writeable = true;
         $repositories[$repositoryObject->getUniqueId()] = $repositoryObject;
     } else {
         foreach ($repositories as $index => $repo) {
             if ($repo->getUniqueId() == $repositoryObject->getUniqueId()) {
                 $repositories[$index] = $repositoryObject;
                 break;
             }
         }
     }
     $res = Utils::saveSerialFile($this->repoSerialFile, $repositories);
     if ($res == -1) {
         return $res;
     }
 }
开发者ID:bloveing,项目名称:openulteo,代码行数:26,代码来源:class.serialConfDriver.php

示例3: saveRepository

 /**
  * Store a newly created repository
  *
  * @param Repository $repositoryObject
  * @param Boolean $update
  * @return -1 if failed
  */
 public function saveRepository($repositoryObject, $update = false)
 {
     $repositories = AJXP_Utils::loadSerialFile($this->repoSerialFile);
     if (!$update) {
         $repositoryObject->writeable = true;
         $repositories[$repositoryObject->getUniqueId()] = $repositoryObject;
     } else {
         foreach ($repositories as $index => $repo) {
             if ($repo->getUniqueId() == $repositoryObject->getUniqueId()) {
                 $repositories[$index] = $repositoryObject;
                 break;
             }
         }
     }
     try {
         AJXP_Utils::saveSerialFile($this->repoSerialFile, $repositories);
     } catch (Exception $e) {
         return -1;
     }
     $this->updateAliasesIndex($repositoryObject->getUniqueId(), $repositoryObject->getSlug());
 }
开发者ID:biggtfish,项目名称:cms,代码行数:28,代码来源:class.serialConfDriver.php

示例4: saveRepository

 /**
  * Store a newly created repository
  *
  * @param Repository $repositoryObject
  * @param Boolean $update
  * @return int -1 if failed
  */
 public function saveRepository($repositoryObject, $update = false)
 {
     try {
         if ($update) {
             $repositoryObject->setSlug($this->uniquifySlug($repositoryObject->getSlug(), $repositoryObject->getUniqueId()));
         } else {
             $repositoryObject->setSlug($this->uniquifySlug($repositoryObject->getSlug()));
         }
         $repository_array = $this->repoToArray($repositoryObject);
         $options = $repository_array['options'];
         if ($repositoryObject->hasContentFilter()) {
             $options["content_filter"] = $repositoryObject->getContentFilter();
         }
         unset($repository_array['options']);
         if (!$update) {
             dibi::query('INSERT INTO [ajxp_repo]', $repository_array);
             foreach ($options as $k => $v) {
                 if (!is_string($v)) {
                     $v = '$phpserial$' . serialize($v);
                 }
                 dibi::query('INSERT INTO [ajxp_repo_options] ([uuid],[name],[val]) VALUES (%s,%s,%bin)', $repositoryObject->getUniqueId(), $k, $v);
             }
         } else {
             dibi::query('DELETE FROM [ajxp_repo] WHERE [uuid] = %s', $repositoryObject->getUniqueId());
             dibi::query('DELETE FROM [ajxp_repo_options] WHERE [uuid] = %s', $repositoryObject->getUniqueId());
             dibi::query('INSERT INTO [ajxp_repo]', $repository_array);
             foreach ($options as $k => $v) {
                 if (!is_string($v)) {
                     $v = '$phpserial$' . serialize($v);
                 }
                 dibi::query('INSERT INTO [ajxp_repo_options] ([uuid],[name],[val]) VALUES (%s,%s,%bin)', $repositoryObject->getUniqueId(), $k, $v);
             }
         }
     } catch (DibiException $e) {
         echo get_class($e), ': ', $e->getMessage(), "\n";
         exit(1);
         return -1;
     }
 }
开发者ID:projectesIF,项目名称:Ateneu,代码行数:46,代码来源:class.sqlConfDriver.php

示例5: checkRepoWithSameLabel

 /**
  * @param $label
  * @param Repository|null $editingRepo
  * @return bool
  */
 protected function checkRepoWithSameLabel($label, $editingRepo = null)
 {
     if ($this->getFilteredOption("AVOID_SHARED_FOLDER_SAME_LABEL", $this->repository) == true) {
         $count = 0;
         $similarLabelRepos = ConfService::listRepositoriesWithCriteria(array("display" => $label), $count);
         if ($count && !isset($editingRepo)) {
             return true;
         }
         if ($count && isset($editingRepo)) {
             foreach ($similarLabelRepos as $slr) {
                 if ($slr->getUniqueId() != $editingRepo->getUniqueId()) {
                     return true;
                 }
             }
         }
     }
     return false;
 }
开发者ID:Nanomani,项目名称:pydio-core,代码行数:23,代码来源:class.ShareCenter.php


注:本文中的Repository::getUniqueId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。