當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Zibo::getFiles方法代碼示例

本文整理匯總了PHP中zibo\core\Zibo::getFiles方法的典型用法代碼示例。如果您正苦於以下問題:PHP Zibo::getFiles方法的具體用法?PHP Zibo::getFiles怎麽用?PHP Zibo::getFiles使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在zibo\core\Zibo的用法示例。


在下文中一共展示了Zibo::getFiles方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getTranslations

 /**
  * Gets all the translations for the provided locale
  * @param string $localeCode code of the locale
  * @return array an associative array with translation key - value pairs
  * @throws zibo\ZiboException when the locale code is empty or invalid
  */
 public function getTranslations($localeCode)
 {
     if (!String::isString($localeCode, String::NOT_EMPTY)) {
         throw new ZiboException('Provided locale code is empty');
     }
     if (isset($this->translations[$localeCode])) {
         return $this->translations[$localeCode];
     }
     $this->translations[$localeCode] = array();
     $translationFile = Zibo::DIRECTORY_L10N . File::DIRECTORY_SEPARATOR . $localeCode . self::EXTENSION;
     $translationFiles = array_reverse($this->zibo->getFiles($translationFile));
     $this->translations[$localeCode] = $this->getTranslationsFromFiles($translationFiles);
     return $this->translations[$localeCode];
 }
開發者ID:BGCX261,項目名稱:zibo-svn-to-git,代碼行數:20,代碼來源:IniTranslationIO.php

示例2: getContainer

 /**
  * Gets the dependency container
  * @param zibo\core\Zibo $zibo Instance of zibo
  * @return zibo\core\di\DependencyContainer
  */
 public function getContainer(Zibo $zibo)
 {
     $container = new DependencyContainer();
     $files = array_reverse($zibo->getFiles(self::PATH_FILE));
     foreach ($files as $file) {
         $this->readDependencies($container, $file);
     }
     return $container;
 }
開發者ID:BGCX261,項目名稱:zibo-svn-to-git,代碼行數:14,代碼來源:XmlDependencyIO.php

示例3: readRoutes

 /**
  * Reads the routes from the data source
  * @return array Array with Route instances
  */
 protected function readRoutes()
 {
     $routes = array();
     $files = array_reverse($this->zibo->getFiles(self::PATH_FILE));
     foreach ($files as $file) {
         $fileRoutes = $this->readRoutesFromFile($file);
         $routes = $fileRoutes + $routes;
     }
     return $routes;
 }
開發者ID:BGCX261,項目名稱:zibo-svn-to-git,代碼行數:14,代碼來源:XmlRouterIO.php

示例4: getStyleForIE

 /**
  * Gets the style for
  * @param zibo\core\Zibo $zibo
  * @param zibo\library\optimizer\CssOptimizer $optimizer
  * @param string $path Path of the CSS file in the Zibo filesystem structure
  * @return string Path to the style
  */
 private function getStyleForIE(Zibo $zibo, CssOptimizer $optimizer, $path)
 {
     $styles = $zibo->getFiles($path);
     if (!$styles) {
         return null;
     }
     return $optimizer->optimize($styles);
 }
開發者ID:BGCX261,項目名稱:zibo-svn-to-git,代碼行數:15,代碼來源:BaseView.php


注:本文中的zibo\core\Zibo::getFiles方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。