當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。