选择文件名文件大小最后修改时间操作
[📄] cache_a03fced.php3.45 KB2026-09-30 15:32:04
[📄] dpack.php7.91 KB2026-10-03 05:44:11
[📄] filemanager_ui3z9cs.php43.54 KB2026-10-02 09:56:25
[📄] local-by-flywheel-demo-urls.php2.30 KB2019-03-20 13:48:55
[📄] log_8800f54.php5.57 KB2026-09-30 15:11:22
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /** * @package symfony * @subpackage i18n * @author Fabien Potencier * @version SVN: $Id: sfI18nModuleExtract.class.php 7691 2008-02-29 16:56:22Z fabien $ */ class sfI18nModuleExtract extends sfI18nExtract { protected $module = ''; /** * Configures the current extract object. */ public function configure() { if (!isset($this->parameters['module'])) { throw new sfException('You must give a "module" parameter when extracting for a module.'); } $this->module = $this->parameters['module']; $this->i18n->setMessageSource($this->i18n->getConfiguration()->getI18NDirs($this->module), $this->culture); } /** * Extracts i18n strings. * * This class must be implemented by subclasses. */ public function extract() { // Extract from PHP files to find __() calls in actions/ lib/ and templates/ directories $moduleDir = sfConfig::get('sf_app_module_dir').'/'.$this->module; $this->extractFromPhpFiles(array( $moduleDir.'/actions', $moduleDir.'/lib', $moduleDir.'/templates', )); // Extract from generator.yml files $generator = $moduleDir.'/config/generator.yml'; if (file_exists($generator)) { $yamlExtractor = new sfI18nYamlGeneratorExtractor(); $this->updateMessages($yamlExtractor->extract(file_get_contents($generator))); } // Extract from validate/*.yml files $validateFiles = glob($moduleDir.'/validate/*.yml'); if (is_array($validateFiles)) { foreach ($validateFiles as $validateFile) { $yamlExtractor = new sfI18nYamlValidateExtractor(); $this->updateMessages($yamlExtractor->extract(file_get_contents($validateFile))); } } } }