选择文件名文件大小最后修改时间操作
[📄] 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
*/ class sfOpenPNEViewConfigHandler extends sfViewConfigHandler { public function execute($configFiles) { $result = parent::execute($configFiles); $data = array(); $first = true; foreach ($this->yamlConfig as $viewName => $values) { if ($viewName == 'all') { continue; } $data[] = ($first ? '' : 'else ')."if (\$templateName.\$this->viewName == '$viewName')\n". "{\n"; $data[] = $this->addCustomizes($viewName); $data[] = "}\n"; $first = false; } $data[] = ($first ? '' : "else\n{")."\n"; $data[] = $this->addCustomizes(); $data[] = ($first ? '' : "}")."\n"; $result .= sprintf("// auto-generated by sfOpenPNEViewConfigHandler\n". "// date: %s\n%s\n", date('Y/m/d H:i:s'), implode('', $data)); return $result; } protected function addCustomizes($viewName = '') { $data = ''; $customizes = $this->mergeConfigValue('customize', $viewName); foreach ($customizes as $name => $customize) { if (!is_array($customize) || empty($customize)) { continue; } $template = array(null, $name); if (!empty($customize['template']) && is_array($customize['template'])) { $template = $customize['template']; } $category = 'array('; if (!empty($customize['category']) && is_array($customize['category'])) { foreach ($customize['category'] as $value) { $category .= '\'' . $value . '\','; } } $category .= ')'; $parts = 'array('; if (!empty($customize['parts']) && is_array($customize['parts'])) { foreach ($customize['parts'] as $value) { $parts .= '\'' . $value . '\','; } } $parts .= ')'; $target = 'array('; if (!empty($customize['target']) && is_array($customize['target'])) { foreach ($customize['target'] as $value) { $target .= '\'' . $value . '\','; } } $target .= ')'; $isComponent = 'false'; if (!empty($customize['is_component'])) { $isComponent = 'true'; } $data .= " \$this->setCustomize('$name', '{$template[0]}', '{$template[1]}', $category, $parts, $target, $isComponent);\n"; $data .= " if (sfConfig::get('sf_logging_enabled')) \$this->context->getEventDispatcher()->notify(new sfEvent(\$this, 'application.log', array(sprintf('Set customize \"%s\" (%s/%s)', '$name', '{$template[0]}', '{$template[1]}'))));\n"; } return $data; } }