本文整理匯總了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);
}