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

## Source for file visitor_yui.php

Documentation is available at visitor_yui.php

1. <?php
2. /**
3. * File containing the ezcTreeVisitorYUIOptions 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. * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
23. * @version //autogentag//
24. * @filesource
25. * @package Tree
26. */
28. /**
29. * Class containing the options for the ezcTreeVisitorYUIOptions class.
30. *
31. * @property string $basePath
32. * Which string to prefix the href-targets with.
33. * @property bool $displayRootNode
34. * Whether the root node should be displayed. The root node will
35. * still be disabled from the links that the visitor create when
36. * $selectedNodeLink is set to true.
37. * @property array(string) $highlightNodeIds
38. * Which IDs should have the 'highlight' CSS class added.
39. * @property bool $selectedNodeLink
40. * If enabled, only the requested node is shown in links, and not the full path.
41. *
42. * @package Tree
43. * @version //autogentag//
44. */
45. class ezcTreeVisitorYUIOptions extends ezcBaseOptions
46. {
47. /**
48. * Constructs an object with the specified values.
49. *
50. * @throws ezcBasePropertyNotFoundException
51. * if $options contains a property not defined
52. * @throws ezcBaseValueException
53. * if $options contains a property with a value not allowed
54. * @param array(string=>mixed) $options
55. */
56. public function __construct ( array $options = array() )
57. {
58. $this->basePath = '';
59. $this->displayRootNode = false;
60. $this->highlightNodeIds = array();
61. $this->selectedNodeLink = false;
63. parent:: __construct ( $options );
64. }
66. /**
67. * Sets the option $name to $value.
68. *
69. * @throws ezcBasePropertyNotFoundException
70. * if the property $name is not defined
71. * @throws ezcBaseValueException
72. * if $value is not correct for the property $name
73. * @param string $name
74. * @param mixed $value
75. * @ignore
76. */
77. public function __set( $name, $value )
78. {
79. switch ( $name )
80. {
81. case 'basePath':
82. if ( ! is_string ( $value ) )
83. {
84. throw new ezcBaseValueException ( $name, $value, 'string' );
85. }
86. $this-> properties [$name] = $value;
87. break;
89. case 'displayRootNode':
90. case 'selectedNodeLink':
91. if ( ! is_bool ( $value ) )
92. {
93. throw new ezcBaseValueException ( $name, $value, 'bool' );
94. }
95. $this-> properties [$name] = $value;
96. break;
98. case 'highlightNodeIds':
99. if ( ! is_array ( $value ) )
100. {
101. throw new ezcBaseValueException ( $name, $value, 'array(string)' );
102. }
103. $this-> properties [$name] = $value;
104. break;
106. default:
107. throw new ezcBasePropertyNotFoundException ( $name );
108. }
109. }
110. }
111. ?>

Documentation generated by phpDocumentor 1.4.3