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


PHP ExpressionLanguage::__construct方法代码示例

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


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

示例1: __construct

 /**
  * ExpressionLanguage constructor.
  *
  * @param ParserCacheInterface|null $cache     The cache
  * @param array                     $providers Providers
  */
 public function __construct(ParserCacheInterface $cache = null, array $providers = array())
 {
     parent::__construct($cache, $providers);
     $reflectionProperty = new \ReflectionProperty('\\Symfony\\Component\\ExpressionLanguage\\ExpressionLanguage', 'lexer');
     $reflectionProperty->setAccessible(true);
     $reflectionProperty->setValue($this, new Lexer());
 }
开发者ID:netresearch,项目名称:kite,代码行数:13,代码来源:ExpressionLanguage.php

示例2: __construct

 /**
  *
  * @param ExecutorInterface $executor
  */
 public function __construct(ExecutorInterface $executor)
 {
     parent::__construct();
     $this->executor = $executor;
     $this->register('object', function ($name, $key) {
         return sprintf('object("%s", "%s")', $name, $key);
     }, function ($arguments, $name, $key) use($executor) {
         $collection = $arguments['collection'];
         $fixtureData = $collection->get($name)->get($key);
         if (!($object = $fixtureData->getObject())) {
             $object = $executor->createObject($collection, $name, $key);
         }
         return $object;
     });
 }
开发者ID:davidbadura,项目名称:fixtures,代码行数:19,代码来源:ExpressionLanguage.php

示例3: __construct

 public function __construct(ParserCacheInterface $cache = null, array $providers = array())
 {
     // prepend the default provider to let users override it easily
     array_unshift($providers, new ExpressionLanguageProvider());
     parent::__construct($cache, $providers);
 }
开发者ID:BusinessCookies,项目名称:CoffeeMachineProject,代码行数:6,代码来源:ExpressionLanguage.php

示例4: __construct

 /**
  * @inheritdoc
  */
 public function __construct(ParserCacheInterface $cache = null, array $providers = array())
 {
     array_unshift($providers, new StringExpressionLanguageProvider());
     array_unshift($providers, new DateTimeExpressionLanguageProvider());
     parent::__construct($cache, $providers);
 }
开发者ID:mehdi-ghezal,项目名称:sellsy-api,代码行数:9,代码来源:ExpressionLanguage.php

示例5: __construct

 /**
  * Construct
  *
  * @param ContainerInterface   $container
  * @param ParserCacheInterface $cache
  * @param array                $providers
  */
 public function __construct(ContainerInterface $container, ParserCacheInterface $cache = null, array $providers = array())
 {
     $this->container = $container;
     array_unshift($providers, new ServiceContainerFunctionProvider());
     parent::__construct($cache, $providers);
 }
开发者ID:Gtvar,项目名称:FivePercent-IntegrationBundle,代码行数:13,代码来源:ContainerAwareExpressionLanguage.php


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