1: <?php
2: /**
3: * @author Chuck Hagenbuch <chuck@horde.org>
4: * @author Mike Naberezny <mike@maintainable.com>
5: * @license http://www.horde.org/licenses/bsd BSD
6: * @category Horde
7: * @package Argv
8: */
9:
10: /**
11: * Format help with indented section bodies.
12: *
13: * @category Horde
14: * @package Argv
15: */
16: class Horde_Argv_IndentedHelpFormatter extends Horde_Argv_HelpFormatter
17: {
18: public function __construct(
19: $indent_increment = 2,
20: $max_help_position = 24,
21: $width = null,
22: $short_first = true)
23: {
24: parent::__construct($indent_increment, $max_help_position, $width, $short_first);
25: }
26:
27: public function formatUsage($usage)
28: {
29: return sprintf(Horde_Argv_Translation::t("Usage:") . " %s\n", $usage);
30: }
31:
32: public function formatHeading($heading)
33: {
34: return sprintf('%' . $this->current_indent . "s%s:\n", '', $heading);
35: }
36:
37: }
38: