选择文件名文件大小最后修改时间操作
[📄] 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
查看 sfOpenPNEViewConfigHandler.class.php - 文件管理器
👁 查看:sfOpenPNEViewConfigHandler.class.php
路径:/virtual/bigbrother/sns/lib/config/sfOpenPNEViewConfigHandler.class.php
大小:2.98 KB · 修改:2010-08-10 13:59:42 · 权限:0644 · 可写
<?php

/**
 * This file is part of the OpenPNE package.
 * (c) OpenPNE Project (http://www.openpne.jp/)
 *
 * For the full copyright and license information, please view the LICENSE
 * file and the NOTICE file that were distributed with this source code.
 */

/**
 * sfOpenPNEViewConfigHandler allows you to configure views for OpenPNE.
 *
 * @package    OpenPNE
 * @subpackage config
 * @author     Kousuke Ebihara <ebihara@tejimaya.com>
 */
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;
  }
}
ページが見つかりませんでした – Lumiere Shop
ここを指しているリンクに誤りがあったようです。検索してみるのはいかがですか ?
お買い物カゴ