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


PHP OptionsResolver::addAllowedTypes方法代码示例

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


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

示例1: configureOptions

 public function configureOptions(OptionsResolver $resolver)
 {
     $resolver->setDefined(['customFormModel', 'territoryRepository', 'projectSettings']);
     $resolver->setRequired(['customFormModel', 'territoryRepository', 'projectSettings']);
     $resolver->addAllowedTypes('customFormModel', CustomFormModelInterface::class);
     $resolver->addAllowedTypes('projectSettings', ProjectSettings::class);
 }
开发者ID:zyxist,项目名称:cantiga,代码行数:7,代码来源:AreaProfileForm.php

示例2: getConfigurableOptions

 /**
  * @return OptionsResolver
  */
 public function getConfigurableOptions()
 {
     $resolver = new OptionsResolver();
     $resolver->setDefaults(['triggered_by' => [], 'ignore_patterns' => []]);
     $resolver->addAllowedTypes('triggered_by', ['array']);
     $resolver->addAllowedTypes('ignore_patterns', ['array']);
     return $resolver;
 }
开发者ID:phpro,项目名称:grumphp,代码行数:11,代码来源:AbstractParserTask.php

示例3: configureOptions

 public function configureOptions(OptionsResolver $resolver)
 {
     $resolver->setRequired(['isORM', 'isEdit', 'isFilter', 'user']);
     $resolver->addAllowedTypes('isORM', 'boolean');
     $resolver->addAllowedTypes('isEdit', 'boolean');
     $resolver->addAllowedTypes('isFilter', 'boolean');
     $resolver->addAllowedTypes('user', [UserInterface::class, 'NULL']);
 }
开发者ID:phpink,项目名称:nami-core-bundle,代码行数:8,代码来源:BaseType.php

示例4: getConfigurableOptions

 /**
  * @return OptionsResolver
  */
 public function getConfigurableOptions()
 {
     $resolver = new OptionsResolver();
     $resolver->setDefaults(array('config_file' => null, 'stop_on_failure' => false));
     $resolver->addAllowedTypes('config_file', array('null', 'string'));
     $resolver->addAllowedTypes('stop_on_failure', array('bool'));
     return $resolver;
 }
开发者ID:aaa2000,项目名称:grumphp,代码行数:11,代码来源:Phpspec.php

示例5: getConfigurableOptions

 /**
  * @return OptionsResolver
  */
 public function getConfigurableOptions()
 {
     $resolver = new OptionsResolver();
     $resolver->setDefaults(['keywords' => [], 'triggered_by' => ['php']]);
     $resolver->addAllowedTypes('keywords', ['array']);
     $resolver->addAllowedTypes('triggered_by', ['array']);
     return $resolver;
 }
开发者ID:phpro,项目名称:grumphp,代码行数:11,代码来源:Blacklist.php

示例6: getConfigurableOptions

 /**
  * @return OptionsResolver
  */
 public function getConfigurableOptions()
 {
     $resolver = new OptionsResolver();
     $resolver->setDefaults(array('keywords' => array(), 'triggered_by' => array('php')));
     $resolver->addAllowedTypes('keywords', array('array'));
     $resolver->addAllowedTypes('triggered_by', array('array'));
     return $resolver;
 }
开发者ID:llaville,项目名称:grumphp,代码行数:11,代码来源:Blacklist.php

示例7: getConfigurableOptions

 /**
  * @return OptionsResolver
  */
 public function getConfigurableOptions()
 {
     $resolver = new OptionsResolver();
     $resolver->setDefaults(['gulp_file' => null, 'task' => null, 'triggered_by' => ['js', 'jsx', 'coffee', 'ts', 'less', 'sass', 'scss']]);
     $resolver->addAllowedTypes('gulp_file', ['null', 'string']);
     $resolver->addAllowedTypes('task', ['null', 'string']);
     $resolver->addAllowedTypes('triggered_by', ['array']);
     return $resolver;
 }
开发者ID:phpro,项目名称:grumphp,代码行数:12,代码来源:Gulp.php

示例8: getConfigurableOptions

 /**
  * @return OptionsResolver
  */
 public function getConfigurableOptions()
 {
     $resolver = new OptionsResolver();
     $resolver->setDefaults(['exclude' => [], 'ruleset' => ['cleancode', 'codesize', 'naming'], 'triggered_by' => ['php']]);
     $resolver->addAllowedTypes('exclude', ['array']);
     $resolver->addAllowedTypes('ruleset', ['array']);
     $resolver->addAllowedTypes('triggered_by', ['array']);
     return $resolver;
 }
开发者ID:phpro,项目名称:grumphp,代码行数:12,代码来源:PhpMd.php

示例9: getConfigurableOptions

 /**
  * @return OptionsResolver
  */
 public function getConfigurableOptions()
 {
     $resolver = new OptionsResolver();
     $resolver->setDefaults(array('grunt_file' => null, 'task' => null, 'triggered_by' => array('js', 'jsx', 'coffee', 'ts', 'less', 'sass', 'scss')));
     $resolver->addAllowedTypes('grunt_file', array('null', 'string'));
     $resolver->addAllowedTypes('task', array('null', 'string'));
     $resolver->addAllowedTypes('triggered_by', array('array'));
     return $resolver;
 }
开发者ID:Big-Shark,项目名称:grumphp,代码行数:12,代码来源:Grunt.php

示例10: getConfigurableOptions

 /**
  * @return OptionsResolver
  */
 public function getConfigurableOptions()
 {
     $resolver = new OptionsResolver();
     $resolver->setDefaults(array('directory' => 'features', 'align' => null));
     $resolver->addAllowedTypes('directory', array('string'));
     $resolver->addAllowedTypes('align', array('null', 'string'));
     $resolver->addAllowedValues('align', array(null, 'left', 'right'));
     return $resolver;
 }
开发者ID:Big-Shark,项目名称:grumphp,代码行数:12,代码来源:Gherkin.php

示例11: getConfigurableOptions

 /**
  * @return OptionsResolver
  */
 public function getConfigurableOptions()
 {
     $resolver = new OptionsResolver();
     $resolver->setDefaults(['script' => null, 'triggered_by' => ['js', 'jsx', 'coffee', 'ts', 'less', 'sass', 'scss'], 'working_directory' => './']);
     $resolver->addAllowedTypes('script', ['string']);
     $resolver->addAllowedTypes('triggered_by', ['array']);
     $resolver->addAllowedTypes('working_directory', ['string']);
     return $resolver;
 }
开发者ID:phpro,项目名称:grumphp,代码行数:12,代码来源:NpmScript.php

示例12: getConfigurableOptions

 /**
  * @return OptionsResolver
  */
 public function getConfigurableOptions()
 {
     $resolver = new OptionsResolver();
     $resolver->setDefaults(['config_file' => null, 'group' => [], 'always_execute' => false]);
     $resolver->addAllowedTypes('config_file', ['null', 'string']);
     $resolver->addAllowedTypes('group', ['array']);
     $resolver->addAllowedTypes('always_execute', ['bool']);
     return $resolver;
 }
开发者ID:phpro,项目名称:grumphp,代码行数:12,代码来源:Phpunit.php

示例13: getConfigurableOptions

 /**
  * @return OptionsResolver
  */
 public function getConfigurableOptions()
 {
     $resolver = new OptionsResolver();
     $resolver->setDefaults(array('triggered_by' => array('php'), 'build_file' => null, 'task' => null));
     $resolver->addAllowedTypes('triggered_by', array('array'));
     $resolver->addAllowedTypes('build_file', array('null', 'string'));
     $resolver->addAllowedTypes('task', array('null', 'string'));
     return $resolver;
 }
开发者ID:Big-Shark,项目名称:grumphp,代码行数:12,代码来源:Ant.php

示例14: getConfigurableOptions

 /**
  * @return OptionsResolver
  */
 public function getConfigurableOptions()
 {
     $resolver = new OptionsResolver();
     $resolver->setDefaults(['skip_mapping' => false, 'skip_sync' => false, 'triggered_by' => ['php', 'xml', 'yml']]);
     $resolver->addAllowedTypes('skip_mapping', ['bool']);
     $resolver->addAllowedTypes('skip_sync', ['bool']);
     $resolver->addAllowedTypes('triggered_by', ['array']);
     return $resolver;
 }
开发者ID:phpro,项目名称:grumphp,代码行数:12,代码来源:DoctrineOrm.php

示例15: getConfigurableOptions

 /**
  * @return OptionsResolver
  */
 public function getConfigurableOptions()
 {
     $resolver = new OptionsResolver();
     $resolver->setDefaults(['working_directory' => null, 'script' => null, 'triggered_by' => ['php', 'phtml']]);
     $resolver->addAllowedTypes('working_directory', ['null', 'string']);
     $resolver->addAllowedTypes('script', ['string']);
     $resolver->addAllowedTypes('triggered_by', ['array']);
     return $resolver;
 }
开发者ID:phpro,项目名称:grumphp,代码行数:12,代码来源:ComposerScript.php


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