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

## Source for file skip_hours.php

Documentation is available at skip_hours.php

1. <?php
2. /**
3. * File containing the ezcFeedSkipHoursElement 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 Feed
23. * @version //autogentag//
24. * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
25. * @filesource
26. */
28. /**
29. * Class defining a skipHours element.
30. *
31. * @property array(int) $hours
32. * Which hours to skip when retrieving a feed, for example
33. * array(1,4,23). The values 0 and 24 can be used for midnight.
34. *
35. * @package Feed
36. * @version //autogentag//
37. */
38. class ezcFeedSkipHoursElement extends ezcFeedElement
39. {
40. /**
41. * Sets the property $name to $value.
42. *
43. * @param string $name The property name
44. * @param mixed $value The property value
45. * @ignore
46. */
47. public function __set( $name, $value )
48. {
49. switch ( $name )
50. {
51. case 'hours':
52. if ( ! is_array ( $value ) )
53. {
54. $value = array( $value );
55. }
57. $this-> properties [$name] = $value;
58. break;
60. default:
61. parent::__set( $name, $value );
62. }
63. }
65. /**
66. * Returns the value of property $name.
67. *
68. * @param string $name The property name
69. * @return mixed
70. * @ignore
71. */
72. public function __get( $name )
73. {
74. switch ( $name )
75. {
76. case 'hours':
77. if ( isset( $this-> properties [$name] ) )
78. {
79. return $this-> properties [$name];
80. }
81. break;
83. default:
84. return parent::__get( $name );
85. }
86. }
87. }
88. ?>

Documentation generated by phpDocumentor 1.4.3