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


PHP Folder::getName方法代码示例

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


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

示例1: postFolderAdd

 /**
  * Call after folder addition in filelist
  * Add the correct folder in the database
  * @param Folder $folder
  * @return void
  */
 public function postFolderAdd($folder)
 {
     if ($folder->getParentFolder() && $folder->getParentFolder()->getName() != '') {
         $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery("uid", "tx_ameosfilemanager_domain_model_folder", "tx_ameosfilemanager_domain_model_folder.identifier like '" . $folder->getParentFolder()->getIdentifier() . "'");
         if (($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) !== FALSE) {
             if (Tools::getFolderPathFromUid($row['uid']) . '/' == $folder->getParentFolder()->getIdentifier()) {
                 $insertArray = array("tstamp" => time(), "crdate" => time(), "cruser_id" => 1, "title" => $folder->getName(), "uid_parent" => $row['uid'], "identifier" => $folder->getIdentifier());
                 $folderRepository = GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager')->get('Ameos\\AmeosFilemanager\\Domain\\Repository\\FolderRepository');
                 $folderRepository->requestInsert($insertArray);
             }
         } else {
             $this->postFolderAdd($folder->getParentFolder());
             $this->postFolderAdd($folder);
         }
     } else {
         $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery("uid", "tx_ameosfilemanager_domain_model_folder", "tx_ameosfilemanager_domain_model_folder.identifier like '" . $folder->getIdentifier() . "'");
         if (($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) === FALSE) {
             $insertArray = array("tstamp" => time(), "crdate" => time(), "cruser_id" => 1, "title" => $folder->getName(), "uid_parent" => 0, "identifier" => $folder->getIdentifier());
             $folderRepository = GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager')->get('Ameos\\AmeosFilemanager\\Domain\\Repository\\FolderRepository');
             $folderRepository->requestInsert($insertArray);
         }
     }
 }
开发者ID:alagukannanKumaresan,项目名称:typo3-ter-ameos_filemanager,代码行数:29,代码来源:Slot.php

示例2: importFromFolder

 public function importFromFolder(Folder $folder)
 {
     try {
         $config = array('url_key' => $folder->getName());
         $metadata = array('experiment_id' => -1, 'task_id' => -1);
         $config = $this->getConfig($folder);
         $this->logImportStart($config);
         $metadata = $this->processMetadata($config);
         $sentences = $this->parseResources($folder, $config);
         $this->processSentences($config, $metadata, $sentences);
         $this->logImportSuccess($config);
         $this->showImported($metadata);
         $folder->lock('imported');
     } catch (\IteratorsLengthsMismatchException $exception) {
         $this->handleNotMatchingNumberOfSentences($config['url_key']);
         $this->handleImportError($folder, $metadata);
     } catch (\ImporterException $exception) {
         $this->logImportAbortion($config, $exception);
         $this->handleImportError($folder, $metadata);
     } catch (Exception $exception) {
         $this->logger->log($exception->getMessage());
         $this->handleImportError($folder, $metadata);
     }
 }
开发者ID:lixiangnlp,项目名称:MT-ComparEval,代码行数:24,代码来源:Importer.php

示例3: update

 /**
  * @brief Updates the folder
  * @param folder the folder to be updated
  */
 public function update(Folder $folder)
 {
     $query = \OCP\DB::prepare('UPDATE ' . self::tableName . ' SET name = ?, opened = ?' . ' WHERE id = ?');
     $params = array($folder->getName(), $folder->getOpened(), $folder->getId());
     $query->execute($params);
     return true;
 }
开发者ID:netcon-source,项目名称:apps,代码行数:11,代码来源:foldermapper.php

示例4: getDefaults

 protected function getDefaults(Folder $experimentFolder)
 {
     return array('name' => $experimentFolder->getName(), 'url_key' => $experimentFolder->getName(), 'description' => '', 'source' => 'source.txt', 'reference' => 'reference.txt');
 }
开发者ID:lixiangnlp,项目名称:MT-ComparEval,代码行数:4,代码来源:ExperimentsImporter.php

示例5: getDefaults

 protected function getDefaults(Folder $folder)
 {
     return array('name' => $folder->getName(), 'url_key' => $folder->getName(), 'experiment' => $this->experimentsModel->getExperimentByName($folder->getParent()->getName()), 'description' => '', 'translation' => 'translation.txt', 'precompute_ngrams' => true);
 }
开发者ID:pompomon,项目名称:MT-ComparEval,代码行数:4,代码来源:TasksImporter.php

示例6: testGetName

 public function testGetName()
 {
     assertThat($this->folder->getName(), is($this->folderName));
 }
开发者ID:DanielDobre,项目名称:fossology,代码行数:4,代码来源:FolderTest.php


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