コード例 #1
0
 /**
  * @inheritdoc
  */
 public function build(ReaderBuilderInterface $builder, array $options)
 {
     if ($options['remove_control_characters']) {
         // remove control characters from parts
         $builder->addPartResourceTransformer(new RemoveControlCharactersTransformer());
     }
     if ($options['remove_byte_order_marks']) {
         // remove BOM's from parts
         $builder->addPartResourceTransformer(new RemoveByteOrderMarkTransformer());
     }
 }
コード例 #2
0
 /**
  * @param ReaderBuilderInterface $builder
  * @param array $options
  *
  * @return void
  */
 public function build(ReaderBuilderInterface $builder, array $options)
 {
     $builder->setReaderType(ReaderBuilderInterface::READER_TYPE_JSONLINES);
 }