示例#1
0
 /**
  * Constructor
  *
  * @param string                       $token            A token
  * @param array                        $servers          An array of servers
  * @param RouterInterface              $router           A router instance
  * @param string                       $purgeInstruction The purge instruction (purge in Varnish 2, ban in Varnish 3)
  * @param BlockRendererInterface       $blockRenderer    A block renderer instance
  * @param BlockContextManagerInterface $contextManager   Block Context manager
  * @param array                        $managers         An array of managers
  * @param Recorder                     $recorder         The cache recorder to build the contextual key
  */
 public function __construct($token, array $servers, RouterInterface $router, $purgeInstruction, BlockRendererInterface $blockRenderer, BlockContextManagerInterface $contextManager, array $managers = array(), Recorder $recorder = null)
 {
     parent::__construct($token, $servers, $router, $purgeInstruction, null);
     $this->blockRenderer = $blockRenderer;
     $this->managers = $managers;
     $this->contextManager = $contextManager;
     $this->recorder = $recorder;
 }
 /**
  * Constructor.
  *
  * @param string                       $token               A token
  * @param FragmentHandler              $fragmentHandler     A fragment handler
  * @param RouterInterface              $router              A router instance
  * @param BlockRendererInterface       $blockRenderer       A block renderer instance
  * @param BlockLoaderInterface         $blockLoader         A block loader instance
  * @param BlockContextManagerInterface $blockContextManager A block context manager instance
  * @param array                        $servers             An array of servers
  * @param string                       $purgeInstruction    The purge instruction (purge in Varnish 2, ban in Varnish 3)
  */
 public function __construct($token, RouterInterface $router, BlockRendererInterface $blockRenderer, BlockLoaderInterface $blockLoader, BlockContextManagerInterface $blockContextManager, FragmentHandler $fragmentHandler, array $servers = array(), $purgeInstruction)
 {
     parent::__construct($token, $servers, $router, $purgeInstruction, null);
     $this->blockRenderer = $blockRenderer;
     $this->blockLoader = $blockLoader;
     $this->blockContextManager = $blockContextManager;
     $this->fragmentHandler = $fragmentHandler;
 }