當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ArrayNodeDefinition::prototype方法代碼示例

本文整理匯總了PHP中Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition::prototype方法的典型用法代碼示例。如果您正苦於以下問題:PHP ArrayNodeDefinition::prototype方法的具體用法?PHP ArrayNodeDefinition::prototype怎麽用?PHP ArrayNodeDefinition::prototype使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition的用法示例。


在下文中一共展示了ArrayNodeDefinition::prototype方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getMultipleQueuesConfiguration

 protected function getMultipleQueuesConfiguration()
 {
     $node = new ArrayNodeDefinition('queues');
     $prototypeNode = $node->prototype('array');
     $this->addQueueNodeConfiguration($prototypeNode);
     $prototypeNode->children()->scalarNode('callback')->isRequired()->end()->end();
     $prototypeNode->end();
     return $node;
 }
開發者ID:danut007ro,項目名稱:RabbitMqBundle,代碼行數:9,代碼來源:Configuration.php

示例2: getHosts

 private function getHosts()
 {
     $node = new ArrayNodeDefinition('hosts');
     $node->prototype('scalar')->end();
     return $node;
 }
開發者ID:hason,項目名稱:NelmioCorsBundle,代碼行數:6,代碼來源:Configuration.php

示例3: configure

 public function configure(ArrayNodeDefinition $builder)
 {
     $builder->prototype('variable');
 }
開發者ID:okwinza,項目名稱:Sylius,代碼行數:4,代碼來源:DefaultSuiteSettingsExtension.php

示例4: testPrototypeEnum

 public function testPrototypeEnum()
 {
     $node = new ArrayNodeDefinition('root');
     $this->assertEquals($node->prototype('enum'), $node->enumPrototype());
 }
開發者ID:symfony,項目名稱:symfony,代碼行數:5,代碼來源:ArrayNodeDefinitionTest.php

示例5: getCellsNode

 /**
  * @return ArrayNodeDefinition
  */
 protected function getCellsNode()
 {
     $node = new ArrayNodeDefinition('cells');
     $node->prototype('array')->children()->scalarNode('name')->cannotBeEmpty()->isRequired()->end()->scalarNode('searcher')->cannotBeEmpty()->isRequired()->end()->scalarNode('transformer')->defaultNull()->end()->scalarNode('class')->defaultValue(self::CELL_CLASS)->end()->scalarNode('service')->defaultValue(null)->end()->end();
     return $node;
 }
開發者ID:krzysztof-gzocha,項目名稱:searcher-bundle,代碼行數:9,代碼來源:Configuration.php

示例6: configure

 /**
  * @param ArrayNodeDefinition $builder
  */
 public function configure(ArrayNodeDefinition $builder)
 {
     $builder->prototype('array')->children()->enumNode('type')->values(['local', 'remote'])->defaultValue('local')->end()->scalarNode('base_dir')->defaultNull()->end()->scalarNode('ssh_command')->defaultValue('ssh')->end()->scalarNode('ssh_options')->defaultNull()->end()->end()->end();
 }
開發者ID:DrSchimke,項目名稱:BehatShellExtension,代碼行數:7,代碼來源:Extension.php

示例7: getServicesDefinition

 protected function getServicesDefinition()
 {
     $node = new ArrayNodeDefinition('services');
     $node->prototype('array')->children()->scalarNode('class')->isRequired()->end()->variableNode('parameters')->defaultValue(array())->end()->end()->end();
     return $node;
 }
開發者ID:sitesupra,項目名稱:sitesupra,代碼行數:6,代碼來源:AbstractPackageConfiguration.php

示例8: getRoutesNode

 /**
  * Node for routing - only
  *
  * @return ArrayNodeDefinition
  */
 private function getRoutesNode()
 {
     $node = new ArrayNodeDefinition('routes');
     $node->prototype('array')->children()->scalarNode('security')->defaultNull()->end()->arrayNode('serialization_groups')->prototype('scalar')->end()->defaultValue(['Default'])->end()->end()->end();
     return $node;
 }
開發者ID:bitecodes,項目名稱:rest-api-generator-bundle,代碼行數:11,代碼來源:Configuration.php


注:本文中的Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition::prototype方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。