1: <?php
2: 3: 4: 5: 6: 7: 8:
9:
10: 11: 12: 13: 14: 15:
16: class Horde_Argv_TitledHelpFormatter extends Horde_Argv_HelpFormatter
17: {
18: public function __construct(
19: $indent_increment = 0,
20: $max_help_position = 24,
21: $width = null,
22: $short_first = false)
23: {
24: parent::__construct($indent_increment, $max_help_position, $width, $short_first);
25: }
26:
27: public function formatUsage($usage)
28: {
29: return sprintf("%s %s\n", $this->formatHeading(Horde_Argv_Translation::t("Usage")), $usage);
30: }
31:
32: public function formatHeading($heading)
33: {
34: $prefix = array('=', '-');
35: return sprintf("%s\n%s\n", $heading, str_repeat($prefix[$this->level], strlen($heading)));
36: }
37:
38: }
39: