Skip to content

Commit 49340fc

Browse files
committed
Merge pull request #91 from phpcr/max_line_length
added max_line_length option
2 parents 7920ce3 + 2b04a29 commit 49340fc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/PHPCR/Util/Console/Command/NodeDumpCommand.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ protected function configure()
3535
->addOption('props', null, InputOption::VALUE_NONE, 'Also dump properties of the nodes')
3636
->addOption('identifiers', null, InputOption::VALUE_NONE, 'Also output node UUID')
3737
->addOption('depth', null, InputOption::VALUE_OPTIONAL, 'Limit how many level of children to show', "-1")
38+
->addOption('max_line_length', null, InputOption::VALUE_OPTIONAL, 'Limit the maximum characters per property', "120")
3839
->addOption('ref-format', 'uuid', InputOption::VALUE_REQUIRED, 'Set the way references should be displayed when dumping reference properties - either "uuid" (default) or "path"')
3940
->addArgument('identifier', InputArgument::OPTIONAL, 'Root path to dump', '/')
4041
->setDescription('Dump subtrees of the content repository')
@@ -70,8 +71,9 @@ protected function execute(InputInterface $input, OutputInterface $output)
7071
$options['ref_format'] = $input->getOption('ref-format');
7172
$options['show_props'] = $input->hasParameterOption('--props');
7273
$options['show_sys_nodes'] = $input->hasParameterOption('--sys-nodes');
74+
$options['max_line_length'] = $input->getOption('max_line_length');
7375

74-
if (null !== $options['ref_format']&& !in_array($options['ref_format'], array('uuid', 'path'))) {
76+
if (null !== $options['ref_format'] && !in_array($options['ref_format'], array('uuid', 'path'))) {
7577
throw new \Exception('The ref-format option must be set to either "path" or "uuid"');
7678
}
7779

0 commit comments

Comments
 (0)