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

## Source for file execution_plugin_visualizer.php

Documentation is available at execution_plugin_visualizer.php

1. <?php
2. /**
3. * This file contains the ezcWorkflowExecutionVisualizerPluginOptions 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 Workflow
23. * @version //autogentag//
24. * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
25. * @filesource
26. */
28. /**
29. * Options class for ezcWorkflowExecutionVisualizerPlugin.
30. *
31. * @property string $directory
32. * The directory to which the DOT files are written.
33. * @property bool $includeVariables
34. * Whether or not to include workflow variables.
35. * @package Workflow
36. * @version //autogen//
37. */
38. class ezcWorkflowExecutionVisualizerPluginOptions extends ezcBaseOptions
39. {
40. /**
41. * Properties.
42. *
43. * @var array(string=>mixed)
44. */
45. protected $properties = array(
46. 'directory' => null,
47. 'includeVariables' => true,
48. );
50. /**
51. * Property write access.
52. *
53. * @param string $propertyName Name of the property.
54. * @param mixed $propertyValue The value for the property.
55. *
56. * @throws ezcBasePropertyNotFoundException
57. * If the the desired property is not found.
58. * @throws ezcBaseFileNotFoundException
59. * When the directory does not exist.
60. * @throws ezcBaseFilePermissionException
61. * When the directory is not writable.
62. * @ignore
63. */
64. public function __set( $propertyName, $propertyValue )
65. {
66. switch ( $propertyName )
67. {
68. case 'directory':
69. if ( ! is_string ( $propertyValue ) )
70. {
71. throw new ezcBaseValueException (
72. $propertyName,
73. $propertyValue,
74. 'string'
75. );
76. }
78. if ( ! is_dir ( $propertyValue ) )
79. {
80. throw new ezcBaseFileNotFoundException ( $propertyValue, 'directory' );
81. }
83. if ( ! is_writable ( $propertyValue ) )
84. {
85. // @codeCoverageIgnoreStart
86. throw new ezcBaseFilePermissionException ( $propertyValue, ezcBaseFileException ::WRITE );
87. // @codeCoverageIgnoreEnd
88. }
89. break;
90. case 'includeVariables':
91. if ( ! is_bool ( $propertyValue ) )
92. {
93. throw new ezcBaseValueException (
94. $propertyName,
95. $propertyValue,
96. 'bool'
97. );
98. }
99. break;
100. default:
101. throw new ezcBasePropertyNotFoundException ( $propertyName );
102. }
103. $this-> properties [$propertyName] = $propertyValue;
104. }
105. }
106. ?>

Documentation generated by phpDocumentor 1.4.3