当前位置: 首页>>代码示例>>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;未经允许,请勿转载。