## Apache Zeta Components Manual :: File Source for statusbar.php

## Source for file statusbar.php

Documentation is available at statusbar.php

1. <?php
2. /**
3. * File containing the ezcConsoleStatusbarOptions class.
4. *
5. * Licensed to the Apache Software Foundation (ASF) under one
6. * or more contributor license agreements. See the NOTICE file
7. * distributed with this work for additional information
8. * regarding copyright ownership. The ASF licenses this file
9. * to you under the Apache License, Version 2.0 (the
10. * "License"); you may not use this file except in compliance
11. * with the License. You may obtain a copy of the License at
12. *
13. * http://www.apache.org/licenses/LICENSE-2.0
14. *
15. * Unless required by applicable law or agreed to in writing,
16. * software distributed under the License is distributed on an
17. * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18. * KIND, either express or implied. See the License for the
19. * specific language governing permissions and limitations
20. * under the License.
21. *
22. * @package ConsoleTools
23. * @version //autogentag//
24. * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
25. * @filesource
26. */
28. /**
29. * Struct class to store the options of the ezcConsoleOutput class.
30. * This class stores the options for the {@link ezcConsoleOutput} class.
31. *
32. * @property string $successChar
33. * The char shown for a succeeded status.
34. * @property string $failureChar
35. * The char shown for a failed status.
36. *
37. * @package ConsoleTools
38. * @version //autogen//
39. */
40. class ezcConsoleStatusbarOptions extends ezcBaseOptions
41. {
42. protected $properties = array(
43. 'successChar' => "+",
44. 'failureChar' => "-",
45. );
47. /**
48. * Option write access.
49. *
50. * @throws ezcBasePropertyNotFoundException
51. * If a desired property could not be found.
52. * @throws ezcBaseValueException
53. * If a desired property value is out of range.
54. *
55. * @param string $key Name of the property.
56. * @param mixed $value The value for the property.
57. * @ignore
58. */
59. public function __set( $key, $value )
60. {
61. switch ( $key )
62. {
63. case "successChar":
64. case "failureChar":
65. if ( is_string ( $value ) === false || strlen ( $value ) < 1 )
66. {
67. throw new ezcBaseValueException ( $key, $value, 'string, not empty' );
68. }
69. break;
70. default:
71. throw new ezcBasePropertyNotFoundException ( $key );
72. }
73. $this-> properties [$key] = $value;
74. }
75. }
77. ?>

Documentation generated by phpDocumentor 1.4.3