__construct() 공개 메소드

Constructor.
public __construct ( Twig_Environment $environment, Symfony\Component\Templating\TemplateNameParserInterface $parser, Symfony\Component\Config\FileLocatorInterface $locator )
$environment Twig_Environment A \Twig_Environment instance
$parser Symfony\Component\Templating\TemplateNameParserInterface A TemplateNameParserInterface instance
$locator Symfony\Component\Config\FileLocatorInterface A FileLocatorInterface instance
 /**
  * Constructor.
  *
  * @param \Twig_Environment           $environment  A \Twig_Environment instance
  * @param TemplateNameParserInterface $parser       A TemplateNameParserInterface instance
  * @param FileLocatorInterface        $locator      A FileLocatorInterface instance
  * @param RequestStack                $requestStack A RequestStack instance
  * @param array                       $devices
  * @param string                      $deviceTypeField
  */
 public function __construct(\Twig_Environment $environment, TemplateNameParserInterface $parser, FileLocatorInterface $locator, RequestStack $requestStack, array $devices, $deviceTypeField)
 {
     parent::__construct($environment, $parser, $locator);
     $this->request = $requestStack->getMasterRequest();
     $this->devices = $devices;
     $this->deviceTypeField = $deviceTypeField;
 }
예제 #2
0
 /**
  * Constructor.
  *
  * @param \Twig_Environment           $environment A \Twig_Environment instance
  * @param TemplateNameParserInterface $parser      A TemplateNameParserInterface instance
  * @param GlobalVariables|null        $globals     A GlobalVariables instance or null
  * @param Stopwatch                   $stopwatch   A Stopwatch instance
  */
 public function __construct(\Twig_Environment $environment, TemplateNameParserInterface $parser, FileLocatorInterface $locator, Stopwatch $stopwatch, GlobalVariables $globals = null)
 {
     parent::__construct($environment, $parser, $locator, $globals);
     $this->stopwatch = $stopwatch;
 }
예제 #3
0
 /**
  * Constructor.
  *
  * @param \Twig_Environment           $environment A \Twig_Environment instance
  * @param TemplateNameParserInterface $parser      A TemplateNameParserInterface instance
  * @param FileLocatorInterface        $locator     A FileLocatorInterface instance
  * @param Stopwatch                   $stopwatch   A Stopwatch instance
  */
 public function __construct(\Twig_Environment $environment, TemplateNameParserInterface $parser, FileLocatorInterface $locator, Stopwatch $stopwatch)
 {
     parent::__construct($environment, $parser, $locator);
     $this->stopwatch = $stopwatch;
 }