コード例 #1
0
 /**
  * {@inheritDoc}
  */
 protected function configure()
 {
     $this->addOption('precision', null);
     $this->addOption('grouping', false);
     $this->addOption('rounding-mode', self::ROUND_HALFUP);
     parent::configure();
 }
コード例 #2
0
 /**
  * {@inheritDoc}
  */
 protected function configure()
 {
     $this->addOption('input_timezone', 'UTC');
     $this->addOption('output_timezone', 'UTC');
     $this->addOption('format', 'Y-m-d H:i:s');
     parent::configure();
 }
コード例 #3
0
 /**
  * {@inheritDoc}
  */
 protected function configure()
 {
     $this->addOption('type', self::FRACTIONAL);
     $this->addOption('precision', 0);
     if (!in_array($this->getOption('type'), self::$types, true)) {
         throw new \InvalidArgumentException(sprintf('The option "type" is expected to be one of "%s"', implode('", "', self::$types)));
     }
     parent::configure();
 }
コード例 #4
0
 protected function configure()
 {
     $this->addOption('create_instance_callback', null);
     // this method must manage the associations
     $this->addOption('remove_instance_callback', null);
     // this method must manage the associations
     $this->addRequiredOption('em');
     $this->addRequiredOption('fields', array());
     $this->addRequiredOption('className');
     parent::configure();
 }
コード例 #5
0
 protected function configure()
 {
     $this->addOption('trim', true);
     $this->addOption('separator', ',');
     $this->addOption('explode_callback', 'explode');
     $this->addOption('implode_callback', 'implode');
     $this->addOption('create_instance_callback', null);
     $this->addRequiredOption('em');
     $this->addRequiredOption('class_name');
     $this->addRequiredOption('field_name');
     parent::configure();
 }
コード例 #6
0
 protected function configure()
 {
     $this->addRequiredOption('em');
     $this->addRequiredOption('className');
     parent::configure();
 }
コード例 #7
0
 /**
  * {@inheritDoc}
  */
 protected function configure()
 {
     $this->addOption('precision', null);
     $this->addOption('grouping', false);
     parent::configure();
 }