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


PHP NodeBuilder::booleanNode方法代码示例

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


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

示例1: addClientConfiguration

 /**
  * @param \Symfony\Component\Config\Definition\Builder\NodeBuilder $node
  */
 private function addClientConfiguration(NodeBuilder $node)
 {
     $node->scalarNode('id')->isRequired()->cannotBeEmpty()->info('Your Billomat Id')->example('company_name');
     $node->scalarNode('api_key')->isRequired()->cannotBeEmpty()->info('Your Billomat API key')->example('12345abc67890def12345abc67890def');
     $children = $node->arrayNode('application')->addDefaultsIfNotSet()->children();
     $this->addApplicationConfiguration($children);
     $node->booleanNode('wait_for_rate_limit_reset')->defaultFalse()->info('Wait for rate limit reset if rate limit is reached during a request');
     $node->booleanNode('async')->defaultFalse()->info('Use asynchronous requests with the Guzzle Async Plugin');
 }
开发者ID:phobetor,项目名称:billomat-bundle,代码行数:12,代码来源:Configuration.php

示例2: addGeneralSection

 private function addGeneralSection(NodeBuilder $pluginSection)
 {
     $plugin = $this->plugin;
     $pluginFqcn = get_class($plugin);
     $imgFolder = $plugin->getImgFolder();
     $ds = DIRECTORY_SEPARATOR;
     $pluginSection->booleanNode('has_options')->defaultFalse()->end()->scalarNode('icon')->validate()->ifTrue(function ($v) use($plugin) {
         return !call_user_func_array(__CLASS__ . '::isIconValid', array($v, $plugin));
     })->thenInvalid($pluginFqcn . " : this file was not found ({$imgFolder}{$ds}%s)")->end()->end()->end();
 }
开发者ID:claroline,项目名称:distribution,代码行数:10,代码来源:Configuration.php

示例3: addConfiguration

 public function addConfiguration(NodeBuilder $node)
 {
     $node->scalarNode('key')->isRequired()->cannotBeEmpty()->end()->scalarNode('token_provider')->end();
     foreach ($this->options as $name => $value) {
         if (is_bool($value)) {
             $node->booleanNode($name)->defaultValue($value);
         } else {
             $node->scalarNode($name)->defaultValue($value);
         }
     }
 }
开发者ID:noelg,项目名称:symfony-demo,代码行数:11,代码来源:RememberMeFactory.php

示例4: addConfiguration

 public function addConfiguration(NodeBuilder $node)
 {
     $node->scalarNode('provider')->end()->booleanNode('remember_me')->defaultTrue()->end()->scalarNode('success_handler')->end()->scalarNode('failure_handler')->end();
     foreach ($this->options as $name => $default) {
         if (is_bool($default)) {
             $node->booleanNode($name)->defaultValue($default);
         } else {
             $node->scalarNode($name)->defaultValue($default);
         }
     }
 }
开发者ID:noelg,项目名称:symfony-demo,代码行数:11,代码来源:AbstractFactory.php

示例5: addDefinitions

 /**
  * Adds the definitions.
  *
  * @param NodeBuilder $node The node builder.
  */
 public function addDefinitions(NodeBuilder $node)
 {
     $node->booleanNode('uuid_handler')->info('Enable the UUID serialization handler for JMS?')->defaultTrue();
 }
开发者ID:kherge,项目名称:uuid-bundle,代码行数:9,代码来源:UuidHandler.php


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