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