本文整理汇总了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];
}
示例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;
}
示例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;
}
示例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);
}