當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。