vendor/willdurand/js-translation-bundle/Finder/TranslationFinder.php
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
namespace Bazinga\Bundle\JsTranslationBundle\Finder;
use Symfony\Component\Finder\Finder;
/**
* @author William DURAND <william.durand1@gmail.com>
* @author Markus Poerschke <markus@eluceo.de>
* @author Hugo MONTEIRO <hugo.monteiro@gmail.com>
*/
class TranslationFinder
{
/**
* @var array list of translation files from the framework bundle
*/
private $translationFilesByLocale;
/**
* @param array $translationFilesByLocale all the translations whose index is the locale
*/
public function __construct(array $translationFilesByLocale)
{
$this->translationFilesByLocale = $translationFilesByLocale;
}
/**
* Returns an array of translation files for a given domain,
* and a given locale.
*
* @param string $domain A domain translation name
* @param string $locale A locale
*
* @return array An array of translation files.
*/
public function get($domain, $locale)
{
$filteredFilenames = $this->getTranslationFilesFromConfiguration($domain, $locale);
return $filteredFilenames;
}
/**
* Returns an array of all translation files.
*
* @return array An array of translation files.
*/
public function all()
{
$filteredFilenames = $this->getAllTranslationFilesFromConfiguration();
return $filteredFilenames;
}
/**
* @return array all translation file names loaded from the FrameworkBundle
*/
private function getAllTranslationFilesFromConfiguration()
{
$filteredFilenames = array();
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。