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

## Source for file dialog.php

Documentation is available at dialog.php

1. <?php
2. /**
3. * This file contains the ezcConsoleDialogOptions 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. * @access public
27. */
29. /**
30. * Basic options class for ezcConsoleDialog implementations.
31. *
32. * @property ezcConsoleDialogValidator $validator
33. * The validator to use with this dialog.
34. * @property string $format
35. * The output format for the dialog.
36. * @package ConsoleTools
37. * @version //autogen//
38. */
39. class ezcConsoleDialogOptions extends ezcBaseOptions
40. {
41. /**
42. * Properties.
43. *
44. * @var array(string=>mixed)
45. */
46. protected $properties = array(
47. "format" => "default",
48. "validator" => null
49. );
51. /**
52. * Property write access.
53. *
54. * @param string $propertyName Name of the property.
55. * @param mixed $propertyValue The value for the property.
56. *
57. * @throws ezcBasePropertyPermissionException
58. * If the property you try to access is read-only.
59. * @throws ezcBasePropertyNotFoundException
60. * If the the desired property is not found.
61. * @ignore
62. */
63. public function __set( $propertyName, $propertyValue )
64. {
65. switch ( $propertyName )
66. {
67. case "format":
68. if ( is_string ( $propertyValue ) === false || strlen ( $propertyValue ) < 1 )
69. {
70. throw new ezcBaseValueException ( $propertyName, $propertyValue, "string, length > 0" );
71. }
72. break;
73. case "validator":
74. if ( ( $propertyValue instanceof ezcConsoleDialogValidator ) === false )
75. {
76. throw new ezcBaseValueException ( $propertyName, $propertyValue, "ezcConsoleDialogValidator" );
77. }
78. break;
79. default:
80. throw new ezcBasePropertyNotFoundException ( $propertyName );
81. }
82. $this-> properties [$propertyName] = $propertyValue;
83. }
84. }
86. ?>

Documentation generated by phpDocumentor 1.4.3