当前位置: 首页>>代码示例>>PHP>>正文


PHP HttpCache::__construct方法代码示例

本文整理汇总了PHP中Symfony\Component\HttpKernel\HttpCache\HttpCache::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP HttpCache::__construct方法的具体用法?PHP HttpCache::__construct怎么用?PHP HttpCache::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Symfony\Component\HttpKernel\HttpCache\HttpCache的用法示例。


在下文中一共展示了HttpCache::__construct方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

    /**
     * Constructor.
     *
     * @param HttpKernelInterface $kernel An HttpKernelInterface instance
     */
    public function __construct(HttpKernelInterface $kernel)
    {
        $store = new Store($kernel->getCacheDir().'/http_cache');
        $esi = new Esi();

        parent::__construct($kernel, $store, $esi, array_merge(array('debug' => $kernel->isDebug()), $this->getOptions()));
    }
开发者ID:ruudk,项目名称:symfony,代码行数:12,代码来源:HttpCache.php

示例2: __construct

 /**
  * Constructor.
  *
  * @param HttpKernelInterface $kernel  An HttpKernelInterface instance
  * @param array               $options
  */
 public function __construct(HttpKernelInterface $kernel, $options)
 {
     $this->kernel = $kernel;
     if (isset($options['cache_dir'])) {
         $this->cacheDir = $options['cache_dir'];
     }
     $this->options = array_merge(array('purge_allowed_ips' => array('127.0.0.1', '::1'), 'debug' => false, 'cache_cookies' => array('shop', 'currency', 'x-cache-context-hash')), $options);
     parent::__construct($kernel, $this->createStore(), $this->createEsi(), $this->options);
 }
开发者ID:GerDner,项目名称:luck-docker,代码行数:15,代码来源:AppCache.php

示例3: __construct

    /**
     * Constructor.
     *
     * @param HttpKernelInterface $kernel An HttpKernelInterface instance
     * @param array $options
     */
    public function __construct(HttpKernelInterface $kernel, $options)
    {
        $this->kernel = $kernel;

        if (isset($options['cache_dir'])) {
            $this->cacheDir = $options['cache_dir'];
        }

        parent::__construct(
            $kernel,
            $this->store = $this->createStore(),
            $this->esi = $this->createEsi(),
            $options
        );
    }
开发者ID:nhp,项目名称:shopware-4,代码行数:21,代码来源:AppCache.php

示例4: __construct

 /**
  * Constructor.
  *
  * @param HttpKernelInterface $kernel   An HttpKernelInterface instance
  * @param string              $cacheDir The cache directory (default used if null)
  */
 public function __construct(HttpKernelInterface $kernel, $cacheDir = null)
 {
     $this->kernel = $kernel;
     $this->cacheDir = $cacheDir;
     parent::__construct($kernel, $this->createStore(), $this->createEsi(), array_merge(array('debug' => $kernel->isDebug()), $this->getOptions()));
 }
开发者ID:ccq18,项目名称:EduSoho,代码行数:12,代码来源:HttpCache.php

示例5: __construct

 public function __construct(HttpKernelInterface $kernel, $options = array())
 {
     parent::__construct($kernel, new Store($kernel->getCacheDir() . '/http_cache'), new Esi(), array_merge(array('debug' => $kernel->isDebug()), $options));
 }
开发者ID:margery,项目名称:thelia,代码行数:4,代码来源:HttpCache.php


注:本文中的Symfony\Component\HttpKernel\HttpCache\HttpCache::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。