File: Zend_ProgressBar_Adapter_Console.xml

package info (click to toggle)
zendframework 1.12.9%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 133,584 kB
  • sloc: xml: 1,311,829; php: 570,173; sh: 170; makefile: 125; sql: 121
file content (123 lines) | stat: -rw-r--r-- 4,305 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<?xml version="1.0" encoding="UTF-8"?>
<!-- Reviewed: no -->
<sect3 id="zend.progressbar.adapter.console">
    <title>Zend_ProgressBar_Adapter_Console</title>

    <para>
        <classname>Zend_ProgressBar_Adapter_Console</classname> is a text-based adapter
        for terminals. It can automatically detect terminal widths but supports
        custom widths as well. You can define which elements are displayed with
        the progressbar and as well customize the order of them. You can also
        define the style of the progressbar itself.
    </para>

    <note>
        <title>Automatic console width recognition</title>

        <para>
            <code>shell_exec</code> is required for this feature to work on
            *nix based systems. On windows, there is always a fixed terminal
            width of 80 character, so no recognition is required there.
        </para>
    </note>

    <para>
        You can set the adapter options either via the <code>set*</code> methods
        or give an array or a <classname>Zend_Config</classname> instance with options as first
        parameter to the constructor. The available options are:
    </para>

    <itemizedlist>
        <listitem>
            <para>
                <code>outputStream</code>: A different output-stream, if you don't
                want to stream to STDOUT. Can be any other stream like
                <code>php://stderr</code> or a path to a file.
            </para>
        </listitem>

        <listitem>
            <para>
                <code>width</code>: Either an integer or the <constant>AUTO</constant>
                constant of <classname>Zend_Console_ProgressBar</classname>.
            </para>
        </listitem>

        <listitem>
            <para>
                <code>elements</code>: Either <constant>NULL</constant> for default
                or an array with at least one of the following constants
                of <classname>Zend_Console_ProgressBar</classname> as value:
            </para>

            <itemizedlist>
                <listitem>
                    <para>
                        <constant>ELEMENT_PERCENT</constant>: The current value in percent.
                    </para>
                </listitem>

                <listitem>
                    <para>
                        <constant>ELEMENT_BAR</constant>: The visual bar which display
                        the percentage.
                    </para>
                </listitem>

                <listitem>
                    <para>
                        <constant>ELEMENT_ETA</constant>: The automatic calculated ETA.
                        This element is firstly displayed after five seconds,
                        because in this time, it is not able to calculate
                        accurate results.
                    </para>
                </listitem>

                <listitem>
                    <para>
                        <constant>ELEMENT_TEXT</constant>: An optional status message
                        about the current process.
                    </para>
                </listitem>
            </itemizedlist>
        </listitem>

        <listitem>
            <para>
                <code>textWidth</code>: Width in characters of the
                <constant>ELEMENT_TEXT</constant> element. Default is 20.
            </para>
        </listitem>

        <listitem>
            <para>
                <code>charset</code>: Charset of the
                <constant>ELEMENT_TEXT</constant> element. Default is utf-8.
            </para>
        </listitem>

        <listitem>
            <para>
                <code>barLeftChar</code>: A string which is used left-hand
                of the indicator in the progressbar.
            </para>
        </listitem>

        <listitem>
            <para>
                <code>barRightChar</code>: A string which is used right-hand
                of the indicator in the progressbar.
            </para>
        </listitem>

        <listitem>
            <para>
                <code>barIndicatorChar</code>: A string which is used for
                the indicator in the progressbar. This one can be empty.
            </para>
        </listitem>
    </itemizedlist>
</sect3>
<!--
vim:se ts=4 sw=4 et:
-->