コード例 #1
0
 /**
  * {@inheritDoc}
  */
 protected function configure()
 {
     // default precision is locale specific (usually around 3)
     $this->addOption('precision');
     $this->addOption('grouping', false);
     $this->addOption('rounding-mode', NumberToLocalizedStringTransformer::ROUND_HALFUP);
     parent::configure();
     $this->setValueTransformer(new NumberToLocalizedStringTransformer(array('precision' => $this->getOption('precision'), 'grouping' => $this->getOption('grouping'), 'rounding-mode' => $this->getOption('rounding-mode'))));
 }
コード例 #2
0
 protected function configure()
 {
     $this->addOption('foo');
     $this->addRequiredOption('bar');
     parent::configure();
 }
コード例 #3
0
 /**
  * {@inheritDoc}
  */
 protected function configure()
 {
     $this->addOption('value');
     parent::configure();
     $this->setValueTransformer(new BooleanToStringTransformer());
 }
コード例 #4
0
 /**
  * {@inheritDoc}
  */
 protected function configure()
 {
     parent::configure();
 }