src/Command/GenerateCommand.php
protected function outputVprintf(InputInterface $input, OutputInterface $output, $data)
	{
		$pattern   = $input->getOption('pattern');
		$enclosure = $input->getOption('enclosure');
		$escape    = $input->getOption('escape');

		foreach ($data as $values) {
			$values = $this->flattenArray((array) $values);

			if ($enclosure) {
				foreach ($values as $key => $value) {
					$values[$key] = $enclosure . str_replace($enclosure, $escape . $enclosure, $value) . $enclosure;
				}
			}

			$output->writeln(vsprintf($pattern, $values));
		}
	}
protected function outputVprintf(InputInterface $input, OutputInterface $output, $data)
	{
		$pattern   = $input->getOption('pattern');
		$enclosure = $input->getOption('enclosure');
		$escape    = $input->getOption('escape');

		foreach ($data as $values) {
			$values = $this->flattenArray((array) $values);

			if ($enclosure) {
				foreach ($values as $key => $value) {
					$values[$key] = $enclosure . str_replace($enclosure, $escape . $enclosure, $value) . $enclosure;
				}
			}

			$output->writeln(vsprintf($pattern, $values));
		}
	}
Generate and output the data as PHP.

@param OutputInterface $output
@param mixed           $data