Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Initial import

  • Loading branch information...
commit 23558fcb56cdd2f79ae0fcab6e1caed485de022b 0 parents
@lorenzo authored
Showing with 21,854 additions and 0 deletions.
  1. 0  README
  2. +62 −0 config/sql/schema_mysql.sql
  3. +57 −0 controllers/tests_controller.php
  4. +53 −0 models/workflow_execution.php
  5. +25 −0 models/workflow_node.php
  6. +26 −0 models/workflow_node_connection.php
  7. +16 −0 models/workflow_variable_handler.php
  8. +16 −0 models/workflow_worflow_storage.php
  9. +178 −0 models/workflow_workflow.php
  10. +87 −0 tests/cases/cake_workflow_execution.test.php
  11. +16 −0 tests/cases/models/workflow_execution.test.php
  12. +16 −0 tests/cases/models/workflow_node.test.php
  13. +16 −0 tests/cases/models/workflow_node_connection.test.php
  14. +16 −0 tests/cases/models/workflow_variable_handler.test.php
  15. +16 −0 tests/cases/models/workflow_worflow_storage.test.php
  16. +136 −0 tests/cases/models/workflow_workflow.test.php
  17. +18 −0 tests/fixtures/workflow_execution_fixture.php
  18. +15 −0 tests/fixtures/workflow_execution_state_fixture.php
  19. +12 −0 tests/fixtures/workflow_node_connection_fixture.php
  20. +14 −0 tests/fixtures/workflow_node_fixture.php
  21. +14 −0 tests/fixtures/workflow_variable_handler_fixture.php
  22. +14 −0 tests/fixtures/workflow_workflow_fixture.php
  23. +110 −0 vendors/cake_workflow_execution.php
  24. +16 −0 vendors/ezc/Base/CREDITS
  25. +326 −0 vendors/ezc/Base/ChangeLog
  26. +2 −0  vendors/ezc/Base/DESCRIPTION
  27. BIN  vendors/ezc/Base/design/class_diagram.png
  28. +9 −0 vendors/ezc/Base/design/design.txt
  29. +9 −0 vendors/ezc/Base/docs/repos/Me/myclass1.php
  30. +9 −0 vendors/ezc/Base/docs/repos/Me/myclass2.php
  31. +9 −0 vendors/ezc/Base/docs/repos/You/yourclass1.php
  32. +9 −0 vendors/ezc/Base/docs/repos/You/yourclass2.php
  33. +6 −0 vendors/ezc/Base/docs/repos/autoloads/my_autoload.php
  34. +6 −0 vendors/ezc/Base/docs/repos/autoloads/your_autoload.php
  35. +240 −0 vendors/ezc/Base/docs/tutorial.txt
  36. +20 −0 vendors/ezc/Base/docs/tutorial_autoload.php
  37. +9 −0 vendors/ezc/Base/docs/tutorial_example_01.php
  38. +11 −0 vendors/ezc/Base/docs/tutorial_example_02.php
  39. +6 −0 vendors/ezc/Base/docs/tutorial_example_03.php
  40. +42 −0 vendors/ezc/Base/docs/tutorial_example_04.php
  41. +38 −0 vendors/ezc/Base/docs/tutorial_lazy_initialization.php
  42. +23 −0 vendors/ezc/Base/review-1.5.txt
  43. +656 −0 vendors/ezc/Base/src/base.php
  44. +38 −0 vendors/ezc/Base/src/exceptions/autoload.php
  45. +34 −0 vendors/ezc/Base/src/exceptions/double_class_repository_prefix.php
  46. +43 −0 vendors/ezc/Base/src/exceptions/exception.php
  47. +38 −0 vendors/ezc/Base/src/exceptions/extension_not_found.php
  48. +25 −0 vendors/ezc/Base/src/exceptions/file_exception.php
  49. +50 −0 vendors/ezc/Base/src/exceptions/file_io.php
  50. +43 −0 vendors/ezc/Base/src/exceptions/file_not_found.php
  51. +63 −0 vendors/ezc/Base/src/exceptions/file_permission.php
  52. +31 −0 vendors/ezc/Base/src/exceptions/functionality_not_supported.php
  53. +31 −0 vendors/ezc/Base/src/exceptions/init_callback_configured.php
  54. +31 −0 vendors/ezc/Base/src/exceptions/invalid_callback_class.php
  55. +29 −0 vendors/ezc/Base/src/exceptions/invalid_parent_class.php
  56. +30 −0 vendors/ezc/Base/src/exceptions/property_not_found.php
  57. +42 −0 vendors/ezc/Base/src/exceptions/property_permission.php
  58. +29 −0 vendors/ezc/Base/src/exceptions/setting_not_found.php
  59. +42 −0 vendors/ezc/Base/src/exceptions/setting_value.php
  60. +43 −0 vendors/ezc/Base/src/exceptions/value.php
  61. +40 −0 vendors/ezc/Base/src/exceptions/whatever.php
  62. +40 −0 vendors/ezc/Base/src/ezc_bootstrap.php
  63. +365 −0 vendors/ezc/Base/src/features.php
  64. +495 −0 vendors/ezc/Base/src/file.php
  65. +125 −0 vendors/ezc/Base/src/init.php
  66. +32 −0 vendors/ezc/Base/src/interfaces/configuration_initializer.php
  67. +40 −0 vendors/ezc/Base/src/interfaces/persistable.php
  68. +120 −0 vendors/ezc/Base/src/metadata.php
  69. +129 −0 vendors/ezc/Base/src/metadata/pear.php
  70. +153 −0 vendors/ezc/Base/src/metadata/tarball.php
  71. +174 −0 vendors/ezc/Base/src/options.php
  72. +75 −0 vendors/ezc/Base/src/options/autoload.php
  73. +42 −0 vendors/ezc/Base/src/struct.php
  74. +72 −0 vendors/ezc/Base/src/structs/file_find_context.php
  75. +83 −0 vendors/ezc/Base/src/structs/repository_directory.php
  76. +81 −0 vendors/ezc/Base/tests/base_init_test.php
  77. +129 −0 vendors/ezc/Base/tests/base_options_test.php
  78. +529 −0 vendors/ezc/Base/tests/base_test.php
  79. +5 −0 vendors/ezc/Base/tests/extra_repository/Translation/test.php
  80. +5 −0 vendors/ezc/Base/tests/extra_repository/autoload/translation_autoload.php
  81. +145 −0 vendors/ezc/Base/tests/features_unix_test.php
  82. +145 −0 vendors/ezc/Base/tests/features_windows_test.php
  83. +92 −0 vendors/ezc/Base/tests/file_calculate_relative_path_test.php
  84. +251 −0 vendors/ezc/Base/tests/file_copy_recursive_test.php
  85. +142 −0 vendors/ezc/Base/tests/file_find_recursive_test.php
  86. +230 −0 vendors/ezc/Base/tests/file_is_absolute_path.php
  87. +157 −0 vendors/ezc/Base/tests/file_remove_recursive_test.php
  88. +23 −0 vendors/ezc/Base/tests/init/base_init_callback.php
  89. +31 −0 vendors/ezc/Base/tests/init/base_init_class.php
  90. +76 −0 vendors/ezc/Base/tests/metadata_pear_test.php
  91. +14 −0 vendors/ezc/Base/tests/metadata_tarball_test.php
  92. +53 −0 vendors/ezc/Base/tests/struct_test.php
  93. +53 −0 vendors/ezc/Base/tests/suite.php
  94. +18 −0 vendors/ezc/Base/tests/test_options.php
  95. +4 −0 vendors/ezc/Base/tests/test_repository/TestClasses/base_test_class.php
  96. +4 −0 vendors/ezc/Base/tests/test_repository/TestClasses/base_test_class_number_two.php
  97. +4 −0 vendors/ezc/Base/tests/test_repository/TestClasses/base_test_long_class.php
  98. +7 −0 vendors/ezc/Base/tests/test_repository/autoload_files/basetest_autoload.php
  99. +5 −0 vendors/ezc/Base/tests/test_repository/autoload_files/basetest_long_autoload.php
  100. +5 −0 vendors/ezc/Base/tests/test_repository/autoload_files/object_autoload.php
  101. +4 −0 vendors/ezc/Base/tests/test_repository/object/object.php
  102. +16 −0 vendors/ezc/Workflow/CREDITS
  103. +173 −0 vendors/ezc/Workflow/ChangeLog
  104. +3 −0  vendors/ezc/Workflow/DESCRIPTION
  105. +3 −0  vendors/ezc/Workflow/TODO
  106. BIN  vendors/ezc/Workflow/design/class_diagram.png
  107. +305 −0 vendors/ezc/Workflow/design/design.txt
  108. +150 −0 vendors/ezc/Workflow/design/requirements.txt
  109. +292 −0 vendors/ezc/Workflow/design/schema.html
  110. +92 −0 vendors/ezc/Workflow/design/schema.rnc
  111. +260 −0 vendors/ezc/Workflow/design/schema.rng
  112. BIN  vendors/ezc/Workflow/docs/img/architecture.png
  113. BIN  vendors/ezc/Workflow/docs/img/exclusive_choice.png
  114. BIN  vendors/ezc/Workflow/docs/img/multi_choice.png
  115. BIN  vendors/ezc/Workflow/docs/img/parallel_split.png
  116. BIN  vendors/ezc/Workflow/docs/img/sequence.png
  117. BIN  vendors/ezc/Workflow/docs/img/simple_merge.png
  118. BIN  vendors/ezc/Workflow/docs/img/synchronization.png
  119. BIN  vendors/ezc/Workflow/docs/img/synchronizing_merge.png
  120. BIN  vendors/ezc/Workflow/docs/img/tutorial_example_06.png
  121. +448 −0 vendors/ezc/Workflow/docs/theoretical_background.txt
  122. +521 −0 vendors/ezc/Workflow/docs/tutorial.txt
  123. +49 −0 vendors/ezc/Workflow/docs/tutorial_example_01.php
  124. +36 −0 vendors/ezc/Workflow/docs/tutorial_example_01a.php
  125. +7 −0 vendors/ezc/Workflow/docs/tutorial_example_02.php
  126. +7 −0 vendors/ezc/Workflow/docs/tutorial_example_03.php
  127. +17 −0 vendors/ezc/Workflow/docs/tutorial_example_06.dot
  128. +6 −0 vendors/ezc/Workflow/docs/tutorial_example_06.php
  129. +18 −0 vendors/ezc/Workflow/review-1.2.txt
  130. +53 −0 vendors/ezc/Workflow/src/conditions/and.php
  131. +67 −0 vendors/ezc/Workflow/src/conditions/in_array.php
  132. +54 −0 vendors/ezc/Workflow/src/conditions/is_anything.php
  133. +54 −0 vendors/ezc/Workflow/src/conditions/is_array.php
  134. +54 −0 vendors/ezc/Workflow/src/conditions/is_bool.php
  135. +48 −0 vendors/ezc/Workflow/src/conditions/is_equal.php
  136. +49 −0 vendors/ezc/Workflow/src/conditions/is_equal_or_greater_than.php
  137. +48 −0 vendors/ezc/Workflow/src/conditions/is_equal_or_less_than.php
  138. +54 −0 vendors/ezc/Workflow/src/conditions/is_false.php
  139. +54 −0 vendors/ezc/Workflow/src/conditions/is_float.php
  140. +49 −0 vendors/ezc/Workflow/src/conditions/is_greater_than.php
  141. +54 −0 vendors/ezc/Workflow/src/conditions/is_integer.php
  142. +49 −0 vendors/ezc/Workflow/src/conditions/is_less_than.php
  143. +48 −0 vendors/ezc/Workflow/src/conditions/is_not_equal.php
  144. +54 −0 vendors/ezc/Workflow/src/conditions/is_object.php
  145. +54 −0 vendors/ezc/Workflow/src/conditions/is_string.php
  146. +54 −0 vendors/ezc/Workflow/src/conditions/is_true.php
  147. +81 −0 vendors/ezc/Workflow/src/conditions/not.php
  148. +53 −0 vendors/ezc/Workflow/src/conditions/or.php
  149. +93 −0 vendors/ezc/Workflow/src/conditions/variable.php
  150. +119 −0 vendors/ezc/Workflow/src/conditions/variables.php
  151. +60 −0 vendors/ezc/Workflow/src/conditions/xor.php
  152. +699 −0 vendors/ezc/Workflow/src/definition_storage/xml.php
  153. +21 −0 vendors/ezc/Workflow/src/exceptions/definition_storage.php
  154. +20 −0 vendors/ezc/Workflow/src/exceptions/exception.php
  155. +20 −0 vendors/ezc/Workflow/src/exceptions/execution.php
  156. +110 −0 vendors/ezc/Workflow/src/exceptions/invalid_input.php
  157. +20 −0 vendors/ezc/Workflow/src/exceptions/invalid_workflow.php
  158. +88 −0 vendors/ezc/Workflow/src/execution/non_interactive.php
  159. +304 −0 vendors/ezc/Workflow/src/execution/plugin/listener.php
  160. +181 −0 vendors/ezc/Workflow/src/execution/plugin/visualizer.php
  161. +34 −0 vendors/ezc/Workflow/src/interfaces/condition.php
  162. +92 −0 vendors/ezc/Workflow/src/interfaces/condition_boolean_set.php
  163. +85 −0 vendors/ezc/Workflow/src/interfaces/condition_comparison.php
  164. +20 −0 vendors/ezc/Workflow/src/interfaces/condition_type.php
  165. +37 −0 vendors/ezc/Workflow/src/interfaces/definition_storage.php
  166. +1,074 −0 vendors/ezc/Workflow/src/interfaces/execution.php
  167. +67 −0 vendors/ezc/Workflow/src/interfaces/execution_listener.php
  168. +192 −0 vendors/ezc/Workflow/src/interfaces/execution_plugin.php
  169. +657 −0 vendors/ezc/Workflow/src/interfaces/node.php
  170. +139 −0 vendors/ezc/Workflow/src/interfaces/node_arithmetic_base.php
  171. +70 −0 vendors/ezc/Workflow/src/interfaces/node_branch.php
  172. +201 −0 vendors/ezc/Workflow/src/interfaces/node_conditional_branch.php
  173. +104 −0 vendors/ezc/Workflow/src/interfaces/node_merge.php
  174. +42 −0 vendors/ezc/Workflow/src/interfaces/service_object.php
  175. +37 −0 vendors/ezc/Workflow/src/interfaces/variable_handler.php
  176. +33 −0 vendors/ezc/Workflow/src/interfaces/visitable.php
  177. +36 −0 vendors/ezc/Workflow/src/interfaces/visitor.php
  178. +252 −0 vendors/ezc/Workflow/src/nodes/action.php
  179. +55 −0 vendors/ezc/Workflow/src/nodes/cancel.php
  180. +93 −0 vendors/ezc/Workflow/src/nodes/control_flow/discriminator.php
  181. +85 −0 vendors/ezc/Workflow/src/nodes/control_flow/exclusive_choice.php
  182. +85 −0 vendors/ezc/Workflow/src/nodes/control_flow/loop.php
  183. +62 −0 vendors/ezc/Workflow/src/nodes/control_flow/multi_choice.php
  184. +61 −0 vendors/ezc/Workflow/src/nodes/control_flow/parallel_split.php
  185. +96 −0 vendors/ezc/Workflow/src/nodes/control_flow/simple_merge.php
  186. +65 −0 vendors/ezc/Workflow/src/nodes/control_flow/synchronization.php
  187. +61 −0 vendors/ezc/Workflow/src/nodes/control_flow/synchronizing_merge.php
  188. +69 −0 vendors/ezc/Workflow/src/nodes/end.php
  189. +24 −0 vendors/ezc/Workflow/src/nodes/finally.php
  190. +70 −0 vendors/ezc/Workflow/src/nodes/start.php
  191. +289 −0 vendors/ezc/Workflow/src/nodes/sub_workflow.php
  192. +84 −0 vendors/ezc/Workflow/src/nodes/variables/add.php
  193. +77 −0 vendors/ezc/Workflow/src/nodes/variables/decrement.php
  194. +84 −0 vendors/ezc/Workflow/src/nodes/variables/div.php
  195. +77 −0 vendors/ezc/Workflow/src/nodes/variables/increment.php
  196. +205 −0 vendors/ezc/Workflow/src/nodes/variables/input.php
  197. +84 −0 vendors/ezc/Workflow/src/nodes/variables/mul.php
  198. +134 −0 vendors/ezc/Workflow/src/nodes/variables/set.php
  199. +84 −0 vendors/ezc/Workflow/src/nodes/variables/sub.php
  200. +126 −0 vendors/ezc/Workflow/src/nodes/variables/unset.php
  201. +90 −0 vendors/ezc/Workflow/src/options/execution_plugin_visualizer.php
  202. +82 −0 vendors/ezc/Workflow/src/options/visitor_visualization.php
  203. +136 −0 vendors/ezc/Workflow/src/util.php
  204. +85 −0 vendors/ezc/Workflow/src/visitors/max_node_id_finder.php
  205. +145 −0 vendors/ezc/Workflow/src/visitors/node_collector.php
  206. +74 −0 vendors/ezc/Workflow/src/visitors/node_counter.php
  207. +64 −0 vendors/ezc/Workflow/src/visitors/reset.php
  208. +115 −0 vendors/ezc/Workflow/src/visitors/verification.php
  209. +258 −0 vendors/ezc/Workflow/src/visitors/visualization.php
  210. +424 −0 vendors/ezc/Workflow/src/workflow.php
  211. +869 −0 vendors/ezc/Workflow/tests/case.php
  212. +300 −0 vendors/ezc/Workflow/tests/condition_test.php
  213. +10 −0 vendors/ezc/Workflow/tests/data/AddVariables.dot
  214. +19 −0 vendors/ezc/Workflow/tests/data/AddVariables_1.xml
  215. +16 −0 vendors/ezc/Workflow/tests/data/ApprovalProcess.dot
  216. +47 −0 vendors/ezc/Workflow/tests/data/ApprovalProcess_1.xml
  217. +13 −0 vendors/ezc/Workflow/tests/data/DecrementingLoop.dot
  218. +26 −0 vendors/ezc/Workflow/tests/data/DecrementingLoop_1.xml
  219. +7 −0 vendors/ezc/Workflow/tests/data/Edit_1.xml
  220. +13 −0 vendors/ezc/Workflow/tests/data/Edit_2.xml
  221. +15 −0 vendors/ezc/Workflow/tests/data/ExclusiveChoiceSimpleMerge.dot
  222. +26 −0 vendors/ezc/Workflow/tests/data/ExclusiveChoiceSimpleMerge_1.xml
  223. +15 −0 vendors/ezc/Workflow/tests/data/ExclusiveChoiceWithElseSimpleMerge.dot
  224. +31 −0 vendors/ezc/Workflow/tests/data/ExclusiveChoiceWithElseSimpleMerge_1.xml
  225. +18 −0 vendors/ezc/Workflow/tests/data/ExclusiveChoiceWithUnconditionalOutNodeSimpleMerge.dot
  226. +39 −0 vendors/ezc/Workflow/tests/data/ExclusiveChoiceWithUnconditionalOutNodeSimpleMerge_1.xml
  227. +10 −0 vendors/ezc/Workflow/tests/data/IncrementVariable_1.xml
  228. +13 −0 vendors/ezc/Workflow/tests/data/IncrementingLoop.dot
  229. +13 −0 vendors/ezc/Workflow/tests/data/IncrementingLoop_000_001.dot
  230. +13 −0 vendors/ezc/Workflow/tests/data/IncrementingLoop_000_002.dot
  231. +13 −0 vendors/ezc/Workflow/tests/data/IncrementingLoop_000_003.dot
  232. +14 −0 vendors/ezc/Workflow/tests/data/IncrementingLoop_000_004.dot
  233. +14 −0 vendors/ezc/Workflow/tests/data/IncrementingLoop_000_005.dot
  234. +14 −0 vendors/ezc/Workflow/tests/data/IncrementingLoop_000_006.dot
  235. +14 −0 vendors/ezc/Workflow/tests/data/IncrementingLoop_000_007.dot
  236. +14 −0 vendors/ezc/Workflow/tests/data/IncrementingLoop_000_008.dot
  237. +14 −0 vendors/ezc/Workflow/tests/data/IncrementingLoop_000_009.dot
  238. +14 −0 vendors/ezc/Workflow/tests/data/IncrementingLoop_000_010.dot
  239. +14 −0 vendors/ezc/Workflow/tests/data/IncrementingLoop_000_011.dot
  240. +14 −0 vendors/ezc/Workflow/tests/data/IncrementingLoop_000_012.dot
  241. +14 −0 vendors/ezc/Workflow/tests/data/IncrementingLoop_000_013.dot
  242. +14 −0 vendors/ezc/Workflow/tests/data/IncrementingLoop_000_014.dot
  243. +14 −0 vendors/ezc/Workflow/tests/data/IncrementingLoop_000_015.dot
  244. +14 −0 vendors/ezc/Workflow/tests/data/IncrementingLoop_000_016.dot
  245. +14 −0 vendors/ezc/Workflow/tests/data/IncrementingLoop_000_017.dot
  246. +14 −0 vendors/ezc/Workflow/tests/data/IncrementingLoop_000_018.dot
  247. +14 −0 vendors/ezc/Workflow/tests/data/IncrementingLoop_000_019.dot
  248. +14 −0 vendors/ezc/Workflow/tests/data/IncrementingLoop_000_020.dot
  249. +14 −0 vendors/ezc/Workflow/tests/data/IncrementingLoop_000_021.dot
  250. +14 −0 vendors/ezc/Workflow/tests/data/IncrementingLoop_000_022.dot
  251. +14 −0 vendors/ezc/Workflow/tests/data/IncrementingLoop_000_023.dot
  252. +14 −0 vendors/ezc/Workflow/tests/data/IncrementingLoop_000_024.dot
  253. +14 −0 vendors/ezc/Workflow/tests/data/IncrementingLoop_000_025.dot
  254. +14 −0 vendors/ezc/Workflow/tests/data/IncrementingLoop_000_026.dot
  255. +14 −0 vendors/ezc/Workflow/tests/data/IncrementingLoop_000_027.dot
  256. +14 −0 vendors/ezc/Workflow/tests/data/IncrementingLoop_000_028.dot
  257. +14 −0 vendors/ezc/Workflow/tests/data/IncrementingLoop_000_029.dot
  258. +14 −0 vendors/ezc/Workflow/tests/data/IncrementingLoop_000_030.dot
  259. +14 −0 vendors/ezc/Workflow/tests/data/IncrementingLoop_000_031.dot
  260. +14 −0 vendors/ezc/Workflow/tests/data/IncrementingLoop_000_032.dot
  261. +14 −0 vendors/ezc/Workflow/tests/data/IncrementingLoop_000_033.dot
  262. +14 −0 vendors/ezc/Workflow/tests/data/IncrementingLoop_000_034.dot
  263. +14 −0 vendors/ezc/Workflow/tests/data/IncrementingLoop_000_035.dot
  264. +14 −0 vendors/ezc/Workflow/tests/data/IncrementingLoop_000_036.dot
  265. +14 −0 vendors/ezc/Workflow/tests/data/IncrementingLoop_000_037.dot
  266. +14 −0 vendors/ezc/Workflow/tests/data/IncrementingLoop_000_038.dot
  267. +14 −0 vendors/ezc/Workflow/tests/data/IncrementingLoop_000_039.dot
  268. +14 −0 vendors/ezc/Workflow/tests/data/IncrementingLoop_000_040.dot
  269. +14 −0 vendors/ezc/Workflow/tests/data/IncrementingLoop_000_041.dot
  270. +14 −0 vendors/ezc/Workflow/tests/data/IncrementingLoop_000_042.dot
  271. +14 −0 vendors/ezc/Workflow/tests/data/IncrementingLoop_000_043.dot
  272. +14 −0 vendors/ezc/Workflow/tests/data/IncrementingLoop_000_044.dot
  273. +26 −0 vendors/ezc/Workflow/tests/data/IncrementingLoop_1.xml
  274. +20 −0 vendors/ezc/Workflow/tests/data/MultiChoiceDiscriminator.dot
  275. +59 −0 vendors/ezc/Workflow/tests/data/MultiChoiceDiscriminator_1.xml
  276. +20 −0 vendors/ezc/Workflow/tests/data/MultiChoiceSynchronizingMerge.dot
  277. +59 −0 vendors/ezc/Workflow/tests/data/MultiChoiceSynchronizingMerge_1.xml
  278. +26 −0 vendors/ezc/Workflow/tests/data/NestedExclusiveChoiceSimpleMerge.dot
  279. +63 −0 vendors/ezc/Workflow/tests/data/NestedExclusiveChoiceSimpleMerge_1.xml
  280. +20 −0 vendors/ezc/Workflow/tests/data/NestedLoops.dot
  281. +45 −0 vendors/ezc/Workflow/tests/data/NestedLoops_1.xml
  282. +6 −0 vendors/ezc/Workflow/tests/data/NotValid_1.xml
  283. +4 −0 vendors/ezc/Workflow/tests/data/NotWellFormed_1.xml
  284. +20 −0 vendors/ezc/Workflow/tests/data/ParallelSplitActionActionCancelCaseSynchronization.dot
  285. +27 −0 vendors/ezc/Workflow/tests/data/ParallelSplitActionActionCancelCaseSynchronization_1.xml
  286. +20 −0 vendors/ezc/Workflow/tests/data/ParallelSplitCancelCaseActionActionSynchronization.dot
  287. +27 −0 vendors/ezc/Workflow/tests/data/ParallelSplitCancelCaseActionActionSynchronization_1.xml
  288. +18 −0 vendors/ezc/Workflow/tests/data/ParallelSplitSynchronization.dot
  289. +15 −0 vendors/ezc/Workflow/tests/data/ParallelSplitSynchronization2.dot
  290. +26 −0 vendors/ezc/Workflow/tests/data/ParallelSplitSynchronization2_1.xml
  291. +24 −0 vendors/ezc/Workflow/tests/data/ParallelSplitSynchronization_1.xml
  292. +10 −0 vendors/ezc/Workflow/tests/data/ServiceObjectThatDoesNotFinish_1.xml
  293. +8 −0 vendors/ezc/Workflow/tests/data/ServiceObjectWithArguments.dot
  294. +17 −0 vendors/ezc/Workflow/tests/data/ServiceObjectWithArguments2_1.xml
  295. +17 −0 vendors/ezc/Workflow/tests/data/ServiceObjectWithArguments3_1.xml
  296. +22 −0 vendors/ezc/Workflow/tests/data/ServiceObjectWithArguments_1.xml
  297. +16 −0 vendors/ezc/Workflow/tests/data/SetAddSubMulDiv.dot
  298. +25 −0 vendors/ezc/Workflow/tests/data/SetAddSubMulDiv_1.xml
  299. +6 −0 vendors/ezc/Workflow/tests/data/StartEnd.dot
  300. +6 −0 vendors/ezc/Workflow/tests/data/StartEnd2.dot
Sorry, we could not display the entire diff because too many files (392) changed.
0  README
No changes.
62 config/sql/schema_mysql.sql
@@ -0,0 +1,62 @@
+CREATE TABLE workflow_workflows (
+ id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
+ name VARCHAR(32) NOT NULL,
+ version INTEGER UNSIGNED NOT NULL DEFAULT 1,
+ created INTEGER NOT NULL,
+
+ PRIMARY KEY (id),
+ UNIQUE KEY name_version (name, version)
+) ENGINE=InnoDB;
+
+CREATE TABLE workflow_nodes (
+ id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
+ workflow_id INTEGER UNSIGNED NOT NULL REFERENCES workflow_workflows.id,
+ class VARCHAR(255) NOT NULL,
+ configuration TEXT NOT NULL,
+
+ PRIMARY KEY (id),
+ KEY workflow_id (workflow_id)
+) ENGINE=InnoDB;
+
+CREATE TABLE workflow_node_connections (
+ incoming_node_id INTEGER UNSIGNED NOT NULL,
+ outgoing_node_id INTEGER UNSIGNED NOT NULL,
+
+ KEY incoming_node_id (incoming_node_id)
+) ENGINE=InnoDB;
+
+CREATE TABLE workflow_variable_handlers (
+ id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
+ workflow_id INTEGER UNSIGNED NOT NULL REFERENCES workflow_workflows.id,
+ variable VARCHAR(255) NOT NULL,
+ class VARCHAR(255) NOT NULL,
+
+ PRIMARY KEY (id),
+ UNIQUE KEY (workflow_id, class)
+) ENGINE=InnoDB;
+
+CREATE TABLE workflow_executions (
+ id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
+ workflow_id INTEGER UNSIGNED NOT NULL REFERENCES workflow_workflows.id,
+ parent_id INTEGER UNSIGNED NOT NULL REFERENCES workflow_executions.id,
+ started TINYINT(1) NOT NULL,
+ variables TEXT NOT NULL,
+ waiting_for TEXT NOT NULL,
+ threads TEXT NOT NULL,
+ next_thread_id INTEGER UNSIGNED NOT NULL,
+
+ PRIMARY KEY (id),
+ KEY execution_parent (parent_id)
+) ENGINE=InnoDB;
+
+CREATE TABLE workflow_execution_states (
+ id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
+ execution_id INTEGER UNSIGNED NOT NULL REFERENCES workflow_executions.id,
+ node_id INTEGER UNSIGNED NOT NULL REFERENCES workflow_nodes.id,
+ state TEXT NOT NULL,
+ activated_from TEXT NOT NULL,
+ thread_id INTEGER UNSIGNED NOT NULL,
+
+ PRIMARY KEY (id),
+ UNIQUE KEY (execution_id, node_id)
+) ENGINE=InnoDB;
57 controllers/tests_controller.php
@@ -0,0 +1,57 @@
+<?php
+
+class TestsController extends WorkFlowAppController {
+
+ var $uses = array();
+
+ function index() {
+ $workflow = new ezcWorkflow( 'Test' );
+ $input = new ezcWorkflowNodeInput(
+ array( 'choice' => new ezcWorkflowConditionIsBool )
+ );
+ // Add the previously created Input node
+ // as an outgoing node to the start node.
+ $workflow->startNode->addOutNode( $input );
+ #
+ // Create a new Exclusive Choice node and add it as an
+ // outgoing node to the previously created Input node.
+ // This node will choose which output to run based on the
+ // choice workflow variable.
+ $branch = new ezcWorkflowNodeExclusiveChoice;
+ $branch->addInNode( $input );
+ #
+ // Either $true or $false will be run depending on
+ // the above choice.
+ // Note that neither $true nor $false are valid action nodes.
+ // see the next example
+ $trueNode = new ezcWorkflowNodeAction( 'PrintTrue' );
+ $falseNode = new ezcWorkflowNodeAction( 'PrintFalse' );
+ #
+ // Branch
+ // Condition: Variable "choice" has boolean value "true".
+ // Action: PrintTrue service object.
+ $branch->addConditionalOutNode(
+ new ezcWorkflowConditionVariable( 'choice', new ezcWorkflowConditionIsTrue ),
+ $trueNode );
+ #
+ // Branch
+ // Condition: Variable "choice" has boolean value "false".
+ // Action: PrintFalse service object.
+ $branch->addConditionalOutNode(
+ new ezcWorkflowConditionVariable( 'choice', new ezcWorkflowConditionIsFalse ),
+ $falseNode
+ );
+ #
+ // Create SimpleMerge node and add the two possible threads of
+ // execution as incoming nodes of the end node.
+ $merge = new ezcWorkflowNodeSimpleMerge;
+ $merge->addInNode( $trueNode );
+ $merge->addInNode( $falseNode );
+ $merge->addOutNode( $workflow->endNode );
+ // Set up workflow definition storage (XML).
+ $definition = new ezcWorkflowDefinitionStorageXml( TMP );
+ #
+ // Save workflow definition to database.
+ $definition->save( $workflow );
+ }
+}
53 models/workflow_execution.php
@@ -0,0 +1,53 @@
+<?php
+class WorkflowExecution extends WorkflowAppModel {
+ var $name = 'WorkflowExecution';
+ //The Associations below have been created with all possible keys, those that are not needed can be removed
+
+ var $belongsTo = array(
+ 'Workflow' => array(
+ 'className' => 'Workflow.WorkflowWorkflow',
+ 'foreignKey' => 'workflow_id',
+ 'conditions' => '',
+ 'fields' => '',
+ 'order' => ''
+ ),
+ 'ParentWorkflowExecution' => array(
+ 'className' => 'Workflow.WorkflowExecution',
+ 'foreignKey' => 'parent_id',
+ 'conditions' => '',
+ 'fields' => '',
+ 'order' => ''
+ )
+ );
+
+ var $hasMany = array(
+ 'ChildWorkflowExecution' => array(
+ 'className' => 'Workflow.WorkflowExecution',
+ 'foreignKey' => 'parent_id',
+ 'dependent' => true,
+ 'conditions' => '',
+ 'fields' => '',
+ 'order' => '',
+ 'limit' => '',
+ 'offset' => '',
+ 'exclusive' => true,
+ 'finderQuery' => '',
+ 'counterQuery' => ''
+ ),
+ 'State' => array(
+ 'className' => 'Workflow.WorkflowExecutionState',
+ 'foreignKey' => 'execution_id',
+ 'dependent' => true,
+ 'conditions' => '',
+ 'fields' => '',
+ 'order' => '',
+ 'limit' => '',
+ 'offset' => '',
+ 'exclusive' => true,
+ 'finderQuery' => '',
+ 'counterQuery' => ''
+ )
+ );
+
+}
+?>
25 models/workflow_node.php
@@ -0,0 +1,25 @@
+<?php
+class WorkflowNode extends WorkflowAppModel {
+ var $name = 'WorkflowNode';
+ //The Associations below have been created with all possible keys, those that are not needed can be removed
+
+ var $belongsTo = array(
+ 'Workflow' => array(
+ 'className' => 'Workflow.WorkflowWorkflow',
+ 'foreignKey' => 'workflow_id',
+ 'conditions' => '',
+ 'fields' => '',
+ 'order' => ''
+ )
+ );
+
+ var $hasAndBelongsToMany = array(
+ 'OutNode' => array(
+ 'className' => 'Workflow.WorkflowNode',
+ 'foreignKey' => 'incoming_node_id',
+ 'associationForeignKey' => 'outgoing_node_id',
+ 'with' => 'workflow.WorkflowNodeConnection'
+ )
+ );
+}
+?>
26 models/workflow_node_connection.php
@@ -0,0 +1,26 @@
+<?php
+class WorkflowNodeConnection extends WorkflowAppModel {
+ var $name = 'WorkflowNodeConnection';
+ var $primaryKey = false;
+ //The Associations below have been created with all possible keys, those that are not needed can be removed
+
+ var $belongsTo = array(
+ 'IncomingNode' => array(
+ 'className' => 'Workflow.WorkflowNode',
+ 'foreignKey' => 'incoming_node_id',
+ 'type' => 'INNER',
+ 'conditions' => '',
+ 'fields' => '',
+ 'order' => ''
+ ),
+ 'OutgoingNode' => array(
+ 'className' => 'Workflow.WorkflowNode',
+ 'foreignKey' => 'outgoing_node_id',
+ 'type' => 'INNER',
+ 'conditions' => '',
+ 'fields' => '',
+ 'order' => ''
+ )
+ );
+}
+?>
16 models/workflow_variable_handler.php
@@ -0,0 +1,16 @@
+<?php
+class WorkflowVariableHandler extends WorkflowAppModel {
+ var $name = 'WorkflowVariableHandler';
+ //The Associations below have been created with all possible keys, those that are not needed can be removed
+
+ var $belongsTo = array(
+ 'Workflow' => array(
+ 'className' => 'Workflow.WorkflowWorkflow',
+ 'foreignKey' => 'workflow_id',
+ 'conditions' => '',
+ 'fields' => '',
+ 'order' => ''
+ )
+ );
+}
+?>
16 models/workflow_worflow_storage.php
@@ -0,0 +1,16 @@
+<?php
+App::import('Model','workflow.WorkFlowWorkflow');
+class WorkflowWorkflowStorage extends WorkflowWorkFlow Implements ezcWorkflowDefinitionStorage {
+ var $name = 'WorkflowWorkflowStorage';
+ var $useTable = false;
+ //The Associations below have been created with all possible keys, those that are not needed can be removed
+
+ function save(ezcWorlflow $workflow) {
+
+ }
+
+ function loadByName($name,$version = 0) {
+
+ }
+}
+?>
178 models/workflow_workflow.php
@@ -0,0 +1,178 @@
+<?php
+class WorkflowWorkflow extends WorkflowAppModel Implements ezcWorkflowDefinitionStorage {
+ var $name = 'WorkflowWorkflow';
+ var $displayField = 'name';
+ //The Associations below have been created with all possible keys, those that are not needed can be removed
+ var $hasMany = array(
+ 'Node' => array(
+ 'className' => 'Workflow.WorkflowNode',
+ 'foreignKey' => 'workflow_id',
+ 'dependent' => true,
+ 'exclusive' => true,
+ ),
+ 'VariableHandler' => array(
+ 'className' => 'Workflow.WorkflowVariableHandler',
+ 'foreignKey' => 'workflow_id',
+ 'dependent' => true,
+ 'exclusive' => true,
+ )
+ );
+
+
+ function save(ezcWorkflow $workflow) {
+ $workflow->verify();
+ $version = $this->currentVersion($workflow->name) + 1;
+
+ $db = ConnectionManager::getDataSource('default');
+ $db->begin($this);
+
+ $data = array();
+ $data[$this->alias]['name'] = $workflow->name;
+ $data[$this->alias]['version'] = $version;
+
+ if (!parent::save($data)) {
+ $db->rollback($this);
+ return false;
+ }
+
+ $data = array();
+ $nodes = $workflow->nodes;
+ foreach ($nodes as $node) {
+ $data['Node'] = array(
+ 'class' => get_class($node),
+ 'configuration' => serialize($node->getConfiguration()),
+ 'workflow_id' => $this->id
+ );
+ $this->Node->create();
+ if (!$this->Node->save($data)) {
+ $db->rollback($this);
+ return false;
+ }
+ $node->setId($this->Node->id);
+ }
+
+ foreach ($nodes as $node) {
+ $data = array();
+ foreach ($node->getOutNodes() as $outNode) {
+ $data['WorkflowNodeConnection']['incoming_node_id'] = $node->getId();
+ $data['WorkflowNodeConnection']['outgoing_node_id'] = $outNode->getId();
+ $this->Node->WorkflowNodeConnection->create();
+ if (!$this->Node->WorkflowNodeConnection->save($data)) {
+ $db->rollback($this);
+ return false;
+ }
+ }
+ }
+
+ $data = array();
+ foreach ($workflow->getVariableHandlers() as $variable => $class) {
+ $data['VariableHandler']['variable'] = $variable;
+ $data['VariableHandler']['class'] = $class;
+ $data['VariableHandler']['workflow_id'] = $this->id;
+ if (!$this->VariableHandler->save($data)) {
+ $db->rollback($this);
+ return false;
+ }
+ }
+
+ $db->commit($this);
+ return true;
+ }
+
+ function currentVersion($name) {
+ $version = $this->find('first',array(
+ 'fields' => "MAX(version) as current",
+ 'conditions' => array('name' => $name),
+ 'recursive' => -1
+ ));
+
+ if (empty($version))
+ return null;
+
+ return (int)$version[0]['current'];
+ }
+
+ public function load($id) {
+ $workflow = $this->read(null,$id);
+
+ if (empty($workflow)) {
+ throw new ezcWorkflowDefinitionStorageException(
+ 'Could not load workflow definition.'
+ );
+ }
+
+ $mappedNodes = array();
+
+ foreach ($workflow['Node'] as $i => $node) {
+ $configuration = unserialize($node['configuration']);
+
+ if (is_null($configuration)) {
+ $configuration = ezcWorkflowUtil::getDefaultConfiguration($node['class']);
+ }
+
+ $nodes[$i] = new $node['class'](
+ $configuration
+ );
+
+ if ($nodes[$i] instanceof ezcWorkflowNodeFinally && !isset($finallyNode)) {
+
+ $finallyNode = $nodes[$i];
+
+ } else if ($nodes[$i] instanceof ezcWorkflowNodeEnd && !isset($defaultEndNode)) {
+
+ $defaultEndNode = $nodes[$i];
+
+ } else if ($nodes[$i] instanceof ezcWorkflowNodeStart && !isset($startNode)) {
+
+ $startNode = $nodes[$i];
+ }
+
+ $mappedNodes[$node['id']] = $i;
+ }
+
+ if (!isset($startNode) || !isset($defaultEndNode)) {
+ throw new ezcWorkflowDefinitionStorageException(
+ 'Could not load workflow definition.'
+ );
+ }
+
+ $connections = $this->Node->WorkflowNodeConnection->find('all',array(
+ 'fields' => array('incoming_node_id','outgoing_node_id'),
+ 'conditions' => array(
+ 'IncomingNode.workflow_id' => $this->id,
+ 'OutgoingNode.workflow_id' => $this->id,
+ )
+ ));
+
+ foreach ($connections as $connection) {
+ $nodes[$mappedNodes[$connection['WorkflowNodeConnection']['incoming_node_id']]]->addOutNode(
+ $nodes[$mappedNodes[$connection['WorkflowNodeConnection']['outgoing_node_id']]]
+ );
+ }
+
+ if (!isset($finallyNode) || count($finallyNode->getInNodes() > 0)) {
+ $finallyNode = null;
+ }
+
+ $workflow = new ezcWorkflow($this->data[$this->alias]['name'],$startNode,$defaultEndNode,$finallyNode);
+ $workflow->definitionStorage = $this;
+ $workflow->id = (int)$this->id;
+ $workflow->version = (int)$this->data[$this->alias]['version'];
+
+ foreach ($this->data['VariableHandler'] as $variableHandler) {
+ $workflow->addVariableHandler($variableHandler['variable'],$variableHandler['class']);
+ }
+
+ $workflow->verify();
+ return $workflow;
+ }
+
+ public function loadByName($name,$version = 0) {
+ $id = $this->field('id',array(
+ $this->alias.'.name' => $name, $this->alias . '.version' => $version
+ )
+ );
+ return $this->load($id);
+ }
+}
+?>
87 tests/cases/cake_workflow_execution.test.php
@@ -0,0 +1,87 @@
+<?php
+
+App::import('Model', 'workflow.WorkflowWorkflow');
+App::import('Vendor', 'workflow.CakeWorkflowExecution');
+
+class MyServiceTestObject implements ezcWorkflowServiceObject {
+ private $message;
+
+ public function __construct( $message ) {
+ $this->message = $message;
+ }
+
+ public function execute( ezcWorkflowExecution $execution ) {
+ echo $this->message;
+ $execution->setVariable( 'choice', true );
+ return true;
+ }
+
+ public function __toString() {
+ return "MyServiceTestObject, message {$this->message}";
+ }
+}
+
+class CakeWorkflowExecutionTestCase extends CakeTestCase {
+ var $fixtures = array(
+ 'plugin.workflow.workflow_workflow',
+ 'plugin.workflow.workflow_node',
+ 'plugin.workflow.workflow_node_connection',
+ 'plugin.workflow.workflow_execution',
+ 'plugin.workflow.workflow_variable_handler',
+ 'plugin.workflow.workflow_execution_state',
+ );
+
+ function startTest() {
+ $this->Definition = ClassRegistry::init('WorkflowWorkflow');
+ }
+
+ function endTest() {
+ unset($this->Definition);
+ ClassRegistry::flush();
+ }
+
+
+ private function buildWorkflow() {
+ $workflow = new ezcWorkflow( 'Test' );
+ $input = new ezcWorkflowNodeInput(
+ array( 'choice' => new ezcWorkflowConditionIsBool )
+ );
+
+ $workflow->startNode->addOutNode( $input );
+ $branch = new ezcWorkflowNodeExclusiveChoice;
+ $branch->addInNode( $input );
+
+ $trueNode = new ezcWorkflowNodeAction( array( 'class' => 'MyServiceTestObject',
+ 'arguments' => array( 'message: TRUE' ) )
+ );
+ $falseNode = new ezcWorkflowNodeAction( array( 'class' => 'MyServiceTestObject',
+ 'arguments' => array( 'message: FALSE' ) )
+ );
+
+ $branch->addConditionalOutNode(
+ new ezcWorkflowConditionVariable( 'choice', new ezcWorkflowConditionIsTrue ),
+ $trueNode );
+ $branch->addConditionalOutNode(
+ new ezcWorkflowConditionVariable( 'choice', new ezcWorkflowConditionIsFalse ),
+ $falseNode
+ );
+ $merge = new ezcWorkflowNodeSimpleMerge;
+ $merge->addInNode( $trueNode );
+ $merge->addInNode( $falseNode );
+ $merge->addOutNode( $workflow->endNode );
+ return $workflow;
+ }
+
+ function testSimpleExecution() {
+ $workflow = $this->buildWorkflow();
+ $this->Definition->save($workflow);
+ $workflow = $this->Definition->loadByName('Test');
+ $execution = new CakeWorkflowExecution();
+ $execution->workflow = $workflow;
+ $execution->start();
+ $execution->resume(array('choice' => true));
+ debug($execution->getVariables());
+ $this->assertFalse($execution->hasEnded());
+ }
+
+}
16 tests/cases/models/workflow_execution.test.php
@@ -0,0 +1,16 @@
+<?php
+/* WorkflowExecution Test cases generated on: 2009-07-19 00:07:42 : 1247979162*/
+App::import('Model', 'workflow.WorkflowExecution');
+
+class WorkflowExecutionTestCase extends CakeTestCase {
+ function startTest() {
+ $this->WorkflowExecution =& ClassRegistry::init('WorkflowExecution');
+ }
+
+ function endTest() {
+ unset($this->WorkflowExecution);
+ ClassRegistry::flush();
+ }
+
+}
+?>
16 tests/cases/models/workflow_node.test.php
@@ -0,0 +1,16 @@
+<?php
+/* WorkflowNode Test cases generated on: 2009-07-19 00:07:50 : 1247979050*/
+App::import('Model', 'workflow.WorkflowNode');
+
+class WorkflowNodeTestCase extends CakeTestCase {
+ function startTest() {
+ $this->WorkflowNode =& ClassRegistry::init('WorkflowNode');
+ }
+
+ function endTest() {
+ unset($this->WorkflowNode);
+ ClassRegistry::flush();
+ }
+
+}
+?>
16 tests/cases/models/workflow_node_connection.test.php
@@ -0,0 +1,16 @@
+<?php
+/* WorkflowNodeConnection Test cases generated on: 2009-07-19 00:07:26 : 1247981366*/
+App::import('Model', 'workflow.WorkflowNodeConnection');
+
+class WorkflowNodeConnectionTestCase extends CakeTestCase {
+ function startTest() {
+ $this->WorkflowNodeConnection =& ClassRegistry::init('WorkflowNodeConnection');
+ }
+
+ function endTest() {
+ unset($this->WorkflowNodeConnection);
+ ClassRegistry::flush();
+ }
+
+}
+?>
16 tests/cases/models/workflow_variable_handler.test.php
@@ -0,0 +1,16 @@
+<?php
+/* WorkflowVariableHandler Test cases generated on: 2009-07-19 00:07:27 : 1247979387*/
+App::import('Model', 'workflow.WorkflowVariableHandler');
+
+class WorkflowVariableHandlerTestCase extends CakeTestCase {
+ function startTest() {
+ $this->WorkflowVariableHandler =& ClassRegistry::init('WorkflowVariableHandler');
+ }
+
+ function endTest() {
+ unset($this->WorkflowVariableHandler);
+ ClassRegistry::flush();
+ }
+
+}
+?>
16 tests/cases/models/workflow_worflow_storage.test.php
@@ -0,0 +1,16 @@
+<?php
+/* WorkflowWorkflow Test cases generated on: 2009-07-19 00:07:32 : 1247978912*/
+App::import('Model', 'workflow.WorkflowWorkflowStorage');
+
+class WorkflowWorkflowStorageTestCase extends CakeTestCase {
+ function startTest() {
+ $this->Storage =& ClassRegistry::init('WorkflowWorkflowStorage');
+ }
+
+ function endTest() {
+ unset($this->Storage);
+ ClassRegistry::flush();
+ }
+
+}
+?>
136 tests/cases/models/workflow_workflow.test.php
@@ -0,0 +1,136 @@
+<?php
+
+App::import('Model', 'workflow.WorkflowWorkflow');
+
+class MyServiceTestObject implements ezcWorkflowServiceObject {
+ private $message;
+
+ public function __construct( $message ) {
+ $this->message = $message;
+ }
+
+ public function execute( ezcWorkflowExecution $execution ) {
+ echo $this->message;
+ $execution->setVariable( 'choice', true );
+ return true;
+ }
+
+ public function __toString() {
+ return "MyServiceTestObject, message {$this->message}";
+ }
+}
+
+class WorkflowWorkflowTestCase extends CakeTestCase {
+ var $fixtures = array(
+ 'plugin.workflow.workflow_workflow',
+ 'plugin.workflow.workflow_node',
+ 'plugin.workflow.workflow_node_connection',
+ 'plugin.workflow.workflow_execution',
+ 'plugin.workflow.workflow_variable_handler'
+ );
+
+ function startTest() {
+ $this->Workflow =& ClassRegistry::init('WorkflowWorkflow');
+ }
+
+ function endTest() {
+ unset($this->WorkflowWorkflow);
+ ClassRegistry::flush();
+ }
+
+ private function buildWorkflow() {
+ $workflow = new ezcWorkflow( 'Test' );
+ $input = new ezcWorkflowNodeInput(
+ array( 'choice' => new ezcWorkflowConditionIsBool )
+ );
+
+ $workflow->startNode->addOutNode( $input );
+ $branch = new ezcWorkflowNodeExclusiveChoice;
+ $branch->addInNode( $input );
+
+ $trueNode = new ezcWorkflowNodeAction( array( 'class' => 'MyServiceTestObject',
+ 'arguments' => array( 'message: TRUE' ) )
+ );
+ $falseNode = new ezcWorkflowNodeAction( array( 'class' => 'MyServiceTestObject',
+ 'arguments' => array( 'message: FALSE' ) )
+ );
+
+ $branch->addConditionalOutNode(
+ new ezcWorkflowConditionVariable( 'choice', new ezcWorkflowConditionIsTrue ),
+ $trueNode );
+ $branch->addConditionalOutNode(
+ new ezcWorkflowConditionVariable( 'choice', new ezcWorkflowConditionIsFalse ),
+ $falseNode
+ );
+ $merge = new ezcWorkflowNodeSimpleMerge;
+ $merge->addInNode( $trueNode );
+ $merge->addInNode( $falseNode );
+ $merge->addOutNode( $workflow->endNode );
+ return $workflow;
+ }
+
+ function testSave() {
+ $worflow = $this->buildWorkflow();
+ //$this->Workflow->save($worflow);
+ }
+
+ function testLoad() {
+ $expected = $this->buildWorkflow();
+ $this->Workflow->save($expected);
+ $id = $this->Workflow->id;
+ $this->Workflow->create();
+ $result = $this->Workflow->load($id);
+ $this->assertEqual(count($result->nodes),count($expected->nodes));
+ $resultNodes = array();
+ $expectedNodes = array();
+
+ foreach ($result->nodes as $node) {
+ $resultNodes[] = $node;
+ }
+ foreach ($expected->nodes as $node) {
+ $expectedNodes[] = $node;
+ }
+
+ foreach ($resultNodes as $i => $node) {
+ $this->assertEqual(count($node->getInNodes()),count($expectedNodes[$i]->getInNodes()));
+ $this->assertEqual(count($node->getOutNodes()),count($expectedNodes[$i]->getOutNodes()));
+ $this->assertEqual($node->getConfiguration(),$expectedNodes[$i]->getConfiguration());
+ $this->assertEqual(get_class($node),get_class($expectedNodes[$i]));
+ }
+
+ }
+
+ function testLoadByName() {
+ $workflow = $this->buildWorkflow();
+ $this->Workflow->save($workflow);
+ $this->Workflow->create();
+ $this->Workflow->save($workflow);
+ $name = $this->Workflow->field('name');
+ $version = $this->Workflow->field('version');
+ $this->assertEqual($name,'Test');
+ $this->assertEqual($version,2);
+
+ $expected = $workflow;
+ $result = $this->Workflow->loadByName('Test',2);
+ $this->assertTrue(is_a($result,'ezcWorkflow'));
+ $this->assertEqual($version,$result->version);
+ $this->assertEqual(count($result->nodes),count($expected->nodes));
+ $resultNodes = array();
+ $expectedNodes = array();
+
+ foreach ($result->nodes as $node) {
+ $resultNodes[] = $node;
+ }
+ foreach ($expected->nodes as $node) {
+ $expectedNodes[] = $node;
+ }
+
+ foreach ($resultNodes as $i => $node) {
+ $this->assertEqual(count($node->getInNodes()),count($expectedNodes[$i]->getInNodes()));
+ $this->assertEqual(count($node->getOutNodes()),count($expectedNodes[$i]->getOutNodes()));
+ $this->assertEqual($node->getConfiguration(),$expectedNodes[$i]->getConfiguration());
+ $this->assertEqual(get_class($node),get_class($expectedNodes[$i]));
+ }
+ }
+}
+?>
18 tests/fixtures/workflow_execution_fixture.php
@@ -0,0 +1,18 @@
+<?php
+/* WorkflowExecution Fixture generated on: 2009-07-19 00:07:42 : 1247979162 */
+class WorkflowExecutionFixture extends CakeTestFixture {
+ var $name = 'WorkflowExecution';
+
+ var $fields = array(
+ 'id' => array('type'=>'integer', 'type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'),
+ 'workflow_id' => array('type'=>'integer', 'type' => 'integer', 'null' => false, 'length' => 10),
+ 'parent_id' => array('type'=>'integer', 'type' => 'integer', 'null' => false, 'length' => 10, 'key' => 'index'),
+ 'started' => array('type'=>'boolean', 'type' => 'boolean', 'null' => false),
+ 'variables' => array('type'=>'text', 'type' => 'text', 'null' => false),
+ 'waiting_for' => array('type'=>'text', 'type' => 'text', 'null' => false),
+ 'threads' => array('type'=>'text', 'type' => 'text', 'null' => false),
+ 'next_thread_id' => array('type'=>'integer', 'type' => 'integer', 'null' => false, 'length' => 10),
+ 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'execution_parent' => array('column' => 'parent_id', 'unique' => 0))
+ );
+}
+?>
15 tests/fixtures/workflow_execution_state_fixture.php
@@ -0,0 +1,15 @@
+<?php
+class WorkflowExecutionStateFixture extends CakeTestFixture {
+ var $name = 'WorkflowExecutionState';
+
+ var $fields = array(
+ 'id' => array('type'=>'integer', 'type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'),
+ 'node_id' => array('type'=>'integer', 'type' => 'integer', 'null' => false),
+ 'execution_id' => array('type'=>'integer', 'type' => 'integer', 'null' => false),
+ 'state' => array('type'=>'string', 'type' => 'string'),
+ 'activated_from' => array('type'=>'string', 'type' => 'string'),
+ 'thread_id' => array('type'=>'integer', 'type' => 'integer', 'null' => false),
+ 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1))
+ );
+}
+?>
12 tests/fixtures/workflow_node_connection_fixture.php
@@ -0,0 +1,12 @@
+<?php
+/* WorkflowNodeConnection Fixture generated on: 2009-07-19 00:07:26 : 1247981366 */
+class WorkflowNodeConnectionFixture extends CakeTestFixture {
+ var $name = 'WorkflowNodeConnection';
+
+ var $fields = array(
+ 'incoming_node_id' => array('type'=>'integer', 'type' => 'integer', 'null' => false, 'length' => 10, 'key' => 'index'),
+ 'outgoing_node_id' => array('type'=>'integer', 'type' => 'integer', 'null' => false, 'length' => 10),
+ 'indexes' => array('incoming_node_id' => array('column' => 'incoming_node_id', 'unique' => 0))
+ );
+}
+?>
14 tests/fixtures/workflow_node_fixture.php
@@ -0,0 +1,14 @@
+<?php
+/* WorkflowNode Fixture generated on: 2009-07-19 00:07:50 : 1247979050 */
+class WorkflowNodeFixture extends CakeTestFixture {
+ var $name = 'WorkflowNode';
+
+ var $fields = array(
+ 'id' => array('type'=>'integer', 'type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'),
+ 'workflow_id' => array('type'=>'integer', 'type' => 'integer', 'null' => false, 'length' => 10, 'key' => 'index'),
+ 'class' => array('type'=>'string', 'type' => 'string', 'null' => false),
+ 'configuration' => array('type'=>'text', 'type' => 'text', 'null' => false),
+ 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'workflow_id' => array('column' => 'workflow_id', 'unique' => 0))
+ );
+}
+?>
14 tests/fixtures/workflow_variable_handler_fixture.php
@@ -0,0 +1,14 @@
+<?php
+/* WorkflowVariableHandler Fixture generated on: 2009-07-19 00:07:27 : 1247979387 */
+class WorkflowVariableHandlerFixture extends CakeTestFixture {
+ var $name = 'WorkflowVariableHandler';
+
+ var $fields = array(
+ 'id' => array('type'=>'integer', 'type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'),
+ 'workflow_id' => array('type'=>'integer', 'type' => 'integer', 'null' => false, 'length' => 10, 'key' => 'index'),
+ 'variable' => array('type'=>'string', 'type' => 'string', 'null' => false),
+ 'class' => array('type'=>'string', 'type' => 'string', 'null' => false),
+ 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'workflow_id' => array('column' => array('workflow_id', 'class'), 'unique' => 1))
+ );
+}
+?>
14 tests/fixtures/workflow_workflow_fixture.php
@@ -0,0 +1,14 @@
+<?php
+/* WorkflowWorkflow Fixture generated on: 2009-07-19 00:07:32 : 1247978912 */
+class WorkflowWorkflowFixture extends CakeTestFixture {
+ var $name = 'WorkflowWorkflow';
+
+ var $fields = array(
+ 'id' => array('type'=>'integer', 'type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'),
+ 'name' => array('type'=>'string', 'type' => 'string', 'null' => false, 'length' => 32, 'key' => 'index'),
+ 'version' => array('type'=>'integer', 'type' => 'integer', 'null' => false, 'default' => '1', 'length' => 10),
+ 'created' => array('type'=>'integer', 'type' => 'integer', 'null' => false),
+ 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'name_version' => array('column' => array('name', 'version'), 'unique' => 1))
+ );
+}
+?>
110 vendors/cake_workflow_execution.php
@@ -0,0 +1,110 @@
+<?php
+
+class CakeWorkflowExecution extends ezcWorkflowExecution {
+
+ private $Execution;
+
+ public function __construct ($executionId = null) {
+ if ($executionId !== null && !is_int( $executionId)){
+ throw new Exception('$executionId must be an integer.');
+ }
+
+ $this->Execution = ClassRegistry::init('workflow.WorkflowExecution');
+ if (is_int($executionId)) {
+ $this->loadExecution($executionId);
+ }
+ }
+
+ protected function doStart($parentId) {
+ $execution = array(
+ 'workflow_id' => $this->workflow->id,
+ 'parent_id' => $parentId,
+ 'started' => time(),
+ 'variables' => serialize($this->variables),
+ 'waiting_for' => serialize($this->waitingFor),
+ 'threads' => serialize($this->threads),
+ 'next_thread_id' => $this->nextThreadId
+ );
+ $this->Execution->save($execution);
+ $this->id = $this->Execution->id;
+ }
+
+ protected function doSuspend() {
+ $this->Execution->id = $this->id;
+ $execution = array(
+ 'variables' => serialize($this->variables),
+ 'waiting_for' => serialize($this->waitingFor),
+ 'threads' => serialize($this->threads),
+ 'next_thread_id' => $this->nextThreadId
+ );
+ $this->Execution->save($execution);
+
+ foreach ($this->activatedNodes as $node) {
+ $state = array(
+ 'execution_id' => $this->id,
+ 'node_id' => $node->getId(),
+ 'state' => serialize($node->getState()),
+ 'activated_from' => serialize($node->getActivatedFrom()),
+ 'node_thread_id' => $node->getThreadId()
+ );
+ $this->Execution->State->create();
+ $this->Execution->State->save($state);
+ }
+ }
+
+ protected function doResume() {
+ $this->Execution->State->deleteAll(array('State.execution_id' => $this->id));
+ }
+
+ protected function doEnd() {
+ if (!$this->isCancelled()) {
+ $this->Execution->deleteAll(array('WorkflowExecution.id' => $this->id));
+ $this->Execution->State->deleteAll(array('execution_id' => $this->id));
+ }
+ }
+
+ protected function doGetSubExecution($id = null) {
+ return new CakeWorkflowExecution($id);
+ }
+
+ protected function loadExecution($executionId) {
+ $execution = $this->Execution->read(null,$executionId);
+
+ if (empty($execution)) {
+ throw new Exception('Could not load execution state.');
+ }
+
+ $this->id = $executionId;
+ $this->nextThreadId = $execution['WorkflowExecution']['next_thread_id'];
+ $this->threads = unserialize($execution['WorkflowExecution']['threads']);
+ $this->variables = unserialize($execution['WorkflowExecution']['variables']);
+ $this->waitingFor = unserialize($execution['WorkflowExecution']['waiting_for']);
+ $workflowId = $execution['WorkflowExecution']['workflow_id'];
+ $this->workflow = $this->Execution->Workflow->load($workflowId);
+
+ $activatedNodes = array();
+ foreach ($execution['State'] as $state) {
+ $activatedNodes[$row['node_id']] = array(
+ 'state' => $state['state'],
+ 'activated_from' => $state['activated_from'],
+ 'thread_id' => $row['thread_id']
+ );
+ }
+
+ foreach ($this->workflow->nodes as $node) {
+ $nodeId = $node->getId();
+ if (isset($activatedNodes[$nodeId])) {
+ $node->setActivationState(ezcWorkflowNode::WAITING_FOR_EXECUTION);
+ $node->setThreadId($activatedNodes[$nodeId]['thread_id']);
+ $node->setState(unserialize( $activatedNodes[$nodeId]['state'], null));
+ $node->setActivatedFrom(unserialize( $activatedNodes[$nodeId]['activated_from']));
+ $this->activate( $node, false );
+ }
+ }
+ $this->cancelled = false;
+ $this->ended = false;
+ $this->loaded = true;
+ $this->resumed = false;
+ $this->suspended = true;
+ }
+}
16 vendors/ezc/Base/CREDITS
@@ -0,0 +1,16 @@
+CREDITS
+=======
+
+eZ Components team
+------------------
+
+- Sergey Alexeev
+- Sebastian Bergmann
+- Jan Borsodi
+- Raymond Bosman
+- Frederik Holljen
+- Kore Nordmann
+- Derick Rethans
+- Vadym Savchuk
+- Tobias Schlitt
+- Alexandru Stanoi
326 vendors/ezc/Base/ChangeLog
@@ -0,0 +1,326 @@
+1.7 - Monday 29 June 2009
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- No changes
+
+
+1.7rc1 - Monday 22 June 2009
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- Fixed an issue with the PEAR reader as sometimes the returned structure is
+ different.
+
+
+1.7beta1 - Monday 08 June 2009
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- Made sure that we (try) to load the PEAR Registry class so that PEAR doesn't
+ have to be in autoload.
+
+
+1.7alpha1 - Tuesday 26 May 2009
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- Added 'SunOS' to the list of Unices to make finding binaries work on Solaris
+ as well.
+- Implemented issue #13718: Include metadata about installed components that
+ can be queried to figure out required PHP versions, dependencies and
+ component versions.
+
+
+1.6.1 - Monday 09 February 2009
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- Fixed issue #14402: Auto detection of external programs (binaries) does not
+ throw warnings anymore.
+
+
+1.6 - Monday 05 January 2009
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- Added a workaround for a segfault in call_user_func() in PHP 5.2.x.
+
+
+1.6rc1 - Monday 15 December 2008
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- Implemented issue #12542: Refactored the ezcBaseFile::findRecursive() method
+ into the ezcBase::walkRecursive() method so that you can setup your own
+ callbacks to "do things". The findRecursive() method is now implemented
+ through this.
+- Fixed issue #14091: Incorrect documentation for
+ ezcBaseConfigurationInitializer.
+
+
+1.6beta1 - Monday 01 December 2008
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- Added the exception class ezcBaseFunctionalityNotSupportedException.
+
+
+1.5.2 - Monday 06 October 2008
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- Fixed an issue in ezcBaseFile::removeRecursive, where the parent directory
+ could not be written to. We now make sure nothing is deleted until we're sure
+ everything can be deleted.
+
+
+1.5.1 - Monday 04 August 2008
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- Fixed issue #13370: Infinitive loop in ezcBaseFile::calculateRelativePath().
+- Implemented issue #11865: Different development modes.
+
+
+1.5 - Monday 16 June 2008
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- No changes.
+
+
+1.5rc1 - Tuesday 10 June 2008
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- No changes
+
+
+1.5beta1 - Tuesday 27 May 2008
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- Added the ezcBasePersistable interface that can be used to ensure that the
+ object implementing this interface can be used with PersistentObject and
+ Search.
+
+
+1.5alpha2 - Tuesday 13 May 2008
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- Fixed a bug in ezcBaseFile::findRecursive that prevented you from passing an
+ empty array to collect statistics.
+- Changed ezcBase::getInstallationPath() so that it always returns a trailing
+ directory separator.
+
+
+1.5alpha1 - Monday 07 April 2008
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- Implemented issue #8529: Added a by-reference argument to
+ ezcBaseFile::findRecursive that returns statistsics (count and total size)
+ of all files that are returned by this function.
+- Implemented issue #11506: Added the static method
+ ezcBase::getInstallationPath().
+- Implemented issue #12694: replace reflection test for class type with spl
+ function.
+
+
+1.4.1 - Monday 14 January 2008
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- Fixed issue #11448: ezc_bootsrap.php uses relative paths.
+- Fixed issue #12316: Numbers in own component prefix not possible.
+- Fixed issue #12329: ezcBaseFeatures::findExecutableInPath's return value
+ does not include the extension to the executable at the end on Windows.
+- Added an optional argument to the ezcBaseValueException constructor to allow
+ the exception to be used for non-property/setting type violations as well.
+
+
+1.4 - Monday 17 December 2007
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- No changes.
+
+
+1.4rc1 - Wednesday 05 December 2007
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- No changes.
+
+
+1.4beta1 - Wednesday 28 November 2007
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- No changes.
+
+
+1.4alpha2 - Monday 29 October 2007
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- Added the ezcBaseFile::copyRecursive() method, to recursively copy files or
+ directories
+- Fixed issue #11540: Problems with ezcFile::findRecursive and
+ ezcFile::calculateRelativePath on systems where DIRECTORY_SEPERATOR is not
+ //.
+
+
+1.4alpha1 - Tuesday 18 September 2007
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- Added the ezcBaseFile class, which was moved from the File component.
+- Added the ezcBaseFile::isAbsolutePath() method, which returns whether a path
+ is absolute or relative.
+
+
+1.3.1 - Monday 30 July 2007
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- Fixed issue #11057: The ezcBaseConfigurationInitializer inteface is not
+ enforced for callback classes.
+
+
+1.3 - Monday 02 July 2007
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- Documentation fixes and updates.
+
+
+1.3rc1 - Monday 25 June 2007
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- Documentation fixes and updates.
+
+
+1.3beta2 - Thursday 31 May 2007
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- Fixed issue #10704: Autoload fails on class not found. The exception is now
+ off by default, but can be turned on through the "debug" property of the
+ ezcBaseAutoloadOptions class. This option class can be set with
+ ezcBase::setOptions().
+
+
+1.3beta1 - Monday 07 May 2007
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- Fixed issue #8433: ezcBase::getRepositoryDirectories() problems.
+- Fixed issue #10583: ezcBaseOptions misses __isset().
+- Fixed issue #10666: ezc_bootstrap.php fails on Windows.
+- Implemented issue #9569: Add "autoload.php" as 3rd fallback autoload file to
+ search for.
+- Implemented issue #9988: Implement component preloading for better opcode
+ cache performance.
+- Added exception class ezcBaseExtensionNotFoundException to be thrown when an
+ extension is required but is not found.
+- Changed the ezcBaseInit::fetchConfig() method to return the value that was
+ returned from the callback function.
+
+
+1.2 - Monday 18 December 2006
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- Fixed issue #9658: Checking if $_ENV['PATH'] is set before using it in
+ ezcBaseFeatures.
+- Fixed issue #9780: ezcBaseFeatures throws notice about non-existing array
+ key "PATH".
+- Fixed issue #9819: Let all components deal with the ezcBaseAutoloadException
+ properly.
+- Fixed the exception name for 'ezcBaseDoubleClassRepositoryPrefix' - it was
+ missing "Exception".
+- Implemented issue #9811: If a file for a class can not be found through
+ autoloading, we now throw the ezcBaseAutoloadException which makes debugging
+ easier.
+- Added the static method ezcBaseFeatures::findExecutableInPath() that searches the
+ path for the given executable.
+- Added the static method ezcBaseFeatures::os() that returns a sanitized
+ version of the current OS' name.
+
+
+1.2beta2 - Monday 20 November 2006
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- Fixed issue #8507: Two autoload directories with the same basepath don't
+ work.
+- Fixed issue #9390: Classes in external repositories that map to the same
+ autoload filename of an internal component were added to the external
+ autoload cache array as well.
+
+
+1.2beta1 - Tuesday 24 October 2006
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- Added the ezcBaseFeatures class to check whether the current PHP
+ installation and environment provides features that can be used in the
+ components.
+- Added the ezcBaseInit class that assists you by setting up on-demand
+ configurations for objects (most notable useful for singleton classes).
+- Implemented FR #8508: Display search paths for the autoload files in case of
+ a missing class.
+- Implemented FR #8753: Added the 'Base/ezc_bootstrap.php' file which sets up
+ the autoload environment for you to facilitate an easier way of starting to
+ use the eZ components.
+
+
+1.1.1 - Monday 28 August 2006
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- Added the ezcBaseStruct class from which all structs in all components
+ should inherit from.
+
+
+1.1 - Friday 09 June 2006
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- Fixed bug #8434: ezcBase autoload system does not handle classes without a
+ prefix.
+- Fixed bug #8435: ezcBase::addClassRepository assumes the ezc way of
+ structuring files. From now on the path specifying the autoload directory is
+ *not* relative to the repository directory anymore.
+
+
+1.1rc1 - Monday 29 May 2006
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- Fixed bug #8252: Autoloading for external repositories only works for the
+ first such class.
+
+
+1.1beta2 - Tuesday 09 May 2006
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- Added support for external class repositories. You can now add a class
+ repository to the autoload mechanism by using the addClassRepository()
+ method.
+- Added a method to return all configured class repositories.
+- Added the REMOVE constant to the ezcBaseFileException.
+- Added the ezcBaseOptions class that serves as base class for all option
+ classes in the components.
+
+
+1.1beta1 - Wednesday 19 April 2006
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- Changed the way how files are included when the SVN checkout of the eZ
+ components was used. This does not affect normal use of the components.
+- Fixed class descriptions for the exceptions in the documentation.
+
+
+1.0 - Monday 30 January 2006
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- Added HTML escaping of exception messages so that they show up correctly in
+ a browser. The original message is stored in the originalMessage property
+ in the exception object.
+
+
+1.0rc1 - Monday 16 January 2006
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- Added the ezcBaseException that all exceptions in the components library
+ should descent from.
+- Added generic File and IO exceptions that all other components can use
+ instead of having to reimplement them.
+- Added ezcBase::checkDependency() method that allows components to specify
+ dependencies on either a PHP version or a PHP extension.
+
+
+1.0beta2 - Wednesday 21 December 2005
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- Added the ezcBasePropertyException that can be used by components to signal
+ that an property was assigned a value which it does not allows.
+
+
+1.0beta1 - Tuesday 22 November 2005
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- Initial release of this package.
2  vendors/ezc/Base/DESCRIPTION
@@ -0,0 +1,2 @@
+The Base package provides the basic infrastructure that all packages rely on.
+Therefore every component relies on this package.
BIN  vendors/ezc/Base/design/class_diagram.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 vendors/ezc/Base/design/design.txt
@@ -0,0 +1,9 @@
+Base
+====
+
+Purpose
+-------
+This is the base package of the eZ publish components, offering the basic
+support that all Components need. In the first version this will be the
+autoload support.
+
9 vendors/ezc/Base/docs/repos/Me/myclass1.php
@@ -0,0 +1,9 @@
+<?php
+class erMyClass1
+{
+ function toString()
+ {
+ echo "Class 'erMyClass1'\n";
+ }
+}
+?>
9 vendors/ezc/Base/docs/repos/Me/myclass2.php
@@ -0,0 +1,9 @@
+<?php
+class erMyClass2
+{
+ function toString()
+ {
+ echo "Class 'erMyClass2'\n";
+ }
+}
+?>
9 vendors/ezc/Base/docs/repos/You/yourclass1.php
@@ -0,0 +1,9 @@
+<?php
+class erYourClass1
+{
+ function toString()
+ {
+ echo "Class 'erYourClass1'\n";
+ }
+}
+?>
9 vendors/ezc/Base/docs/repos/You/yourclass2.php
@@ -0,0 +1,9 @@
+<?php
+class erYourClass2
+{
+ function toString()
+ {
+ echo "Class 'erYourClass2'\n";
+ }
+}
+?>
6 vendors/ezc/Base/docs/repos/autoloads/my_autoload.php
@@ -0,0 +1,6 @@
+<?php
+ return array (
+ 'erMyClass1' => 'Me/myclass1.php',
+ 'erMyClass2' => 'Me/myclass2.php',
+ );
+?>
6 vendors/ezc/Base/docs/repos/autoloads/your_autoload.php
@@ -0,0 +1,6 @@
+<?php
+ return array (
+ 'erYourClass1' => 'You/yourclass1.php',
+ 'erYourClass2' => 'You/yourclass2.php',
+ );
+?>
240 vendors/ezc/Base/docs/tutorial.txt
@@ -0,0 +1,240 @@
+eZ Components - Base
+~~~~~~~~~~~~~~~~~~~~
+
+.. contents:: Table of Contents
+
+Introduction
+============
+
+The Base component provides the basic functionality, such as autoloading, that
+all eZ Components need to function properly. The Base component needs to be
+loaded specifically. Base can also autoload external class repositories from
+outside the eZ Components.
+
+Aside from the autoload functionality, the Base component also contains a number of
+generic Exception classes that all inherit from the ezcBaseException class.
+
+
+Installation
+============
+
+The installation and configuration of the eZ Components environment is
+described in a separate article. Please refer to the `Components Introduction`_
+for instructions on installation and configuration of the eZ Components library
+and the Base component.
+
+.. _Components Introduction: /docs/install
+
+
+Usage
+=====
+
+Debugging
+---------
+
+By default the ezcBase component's autoload mechanism will not throw an
+exception when an autoload class can not be found. In some cases (during
+development) it is useful to have an exception with detailed information
+about which autoload files were searched for, and in which directories.
+ezcBase supports an option that enables this behavior::
+
+ <?php
+ $options = new ezcBaseAutoloadOptions;
+ $options->debug = true;
+ ezcBase::setOptions( $options );
+ ?>
+
+**Warning**: Exceptions are ignored when they are thrown from an autoload()
+handler in PHP. In order to see the exception message that is thrown when a
+class can not be found, you need to catch the exception *in* the autoload()
+handler. Your autoload() function could then look like::
+
+ function __autoload( $className )
+ {
+ try
+ {
+ ezcBase::autoload( $className );
+ }
+ catch ( Exception $e )
+ {
+ echo $e->getMessage();
+ }
+ }
+
+Preloading
+----------
+
+The default autoload policy of the eZ Components is to load every class
+file on demand only. It is also possible to load all classes of one
+component at the same time, when one of the component's classes is
+requested for the first time. You can change this behavior with the
+"preload" option that is available through the ezcBaseAutoloadOptions option
+class. You can turn preloading on with::
+
+ <?php
+ $options = new ezcBaseAutoloadOptions;
+ $options->preload = true;
+ ezcBase::setOptions( $options );
+ ?>
+
+Please note that preloading will *not* be done for Exception classes.
+
+Adding class repositories located outside eZ Components to autoload system
+--------------------------------------------------------------------------
+
+It can be useful to add repositories of user-defined classes to the eZ
+Components autoload system. The ezcBase::addClassRepository() method can be
+used to perform this task. You need to arrange the desired external classes
+in a class repository. That is, make sure that classes and corresponding
+\*_autoload.php files are named and placed according to the explanations below.
+After they are in the proper structure, you can call addClassRepository() with
+the proper parameters before you use the external classes.
+External classes will then be loaded by autoload system.
+
+ezcBase::addClassRepository() takes two arguments:
+
+- $basePath is the base path for the whole class repository.
+- $autoloadDirPath is the path where autoload files for this repository are found.
+
+The paths in the autoload files are *not* relative to the package directory
+as specified by the $basePath argument. In other words, class definition files will
+only be searched for in the location $autoloadDirPath.
+
+Consider the following example:
+
+- There is a class repository stored in the directory "./repos".
+- Autoload files for this repository are stored in "./repos/autoloads".
+- There are two components in this repository: "Me" and "You".
+- The "Me" component has the classes "erMyClass1" and "erMyClass2".
+- The "You" component has the classes "erYourClass1" and "erYourClass2".
+
+In this case, you need to create the following files in "./repos/autoloads".
+Note that the prefix to _autoload.php ("my" and "your") in the filename is the
+first part of the classname (excluding the lowercase classname prefix - "er").
+
+Content of my_autoload.php:
+
+.. include:: repos/autoloads/my_autoload.php
+ :literal:
+
+Content of your_autoload.php:
+
+.. include:: repos/autoloads/your_autoload.php
+ :literal:
+
+The directory structure for the external repository is then: ::
+
+ ./repos/autoloads/my_autoload.php
+ ./repos/autoloads/your_autoload.php
+ ./repos/Me/myclass1.php
+ ./repos/Me/myclass2.php
+ ./repos/You/yourclass1.php
+ ./repos/You/yourclass2.php
+
+To use this repository with the autoload mechanism, use the
+following code:
+
+.. include:: tutorial_example_01.php
+ :literal:
+
+The above code will output: ::
+
+ Class 'erMyClass2'
+ Class 'erYourClass1'
+
+Lazy initialization
+-------------------
+
+Lazy initialization is a mechanism to load and configure a component, only
+when it is really used in your application. This mechanism saves time for
+parsing the classes and configuration, when the component is not used at all
+during one request. The implementation in ezcBaseInit may be reused by other
+applications and components, like the following example will show.
+
+.. include:: tutorial_lazy_initialization.php
+ :literal:
+
+The example shows a random class implementing the singleton pattern, which may
+be some database connection handler, or anything similar in your case. The
+getInstance() method shows a typical PHP 5 implementation except the
+additional line 14, which checks, if a configuration callback was provided
+earlier and configures the newly created instance. If no configuration
+callback was provided, nothing will happen. The customKey is used to receive
+the right callback from ezcBaseInit and needs to be known by the user, who
+wants to define a configuration callback for your class.
+
+In line 32 the class used to configure your instance on creation is defined.
+The first parameter is the key used earlier in the getInstance method, to
+reference the right class, and the second parameter is the name of your
+configuration class.
+
+The configuration class beginning in line 22 just needs to implement the
+ezcBaseConfigurationInitializer interface, which defines one
+method: configureObject(). This method will be called with the object to
+configure as a single parameter. In the example, a new public property on the
+customSingleton instance is created, which will be echo'd later to show the
+success of the configuration.
+
+The configuration itself will not happen before the actual instance is created
+in line 35 performing the static call on customSingleton::getInstance(). The
+var_dump() in the following line shows, that the property value is set and
+contains the earlier set value (int) 42.
+
+File Operations
+---------------
+
+Finding files recursively
+`````````````````````````
+
+This example shows how to use the ezcBaseFile::findRecursive() method:
+
+.. include:: tutorial_example_02.php
+ :literal:
+
+The code in this example searches for files in the ``/dat/dev/ezcomponents``
+directory. It will only include files that match *all* patterns in the
+$includeFilters array (the second parameter). Files that match *any* of the
+patterns in the $excludeFilters array (the third parameter) will not be returned.
+
+In other words, the code above searches for files in the ``dat/dev/ezcomponents``
+directory, which are in the ``src/`` directory and end with ``_autoload.php``,
+except for files that are in the ``/autoload/`` directory.
+
+Removing directories recursively
+````````````````````````````````
+
+This example shows how to use the ezcBaseFile::removeRecursive() method:
+
+.. include:: tutorial_example_03.php
+ :literal:
+
+This code simply removes the directory ``/dat/dev/ezcomponents/trash`` and all
+of its files and sub-directories.
+
+**Warning: Use this function with care, as it has the potential to erase
+everything that the current user has access to.**
+
+Overloading the callback
+````````````````````````
+
+The ezcBaseFile::findRecursive() method internally uses the
+ezcBaseFile::walkRecursive() method to do the actual recursing. The callback
+method ezcBaseFile::findRecursiveCallback() is then responsible for collecting
+the data. In case you want to do additional things, such as printing progress,
+you can either call walkRecursive() yourself with a callback function of your
+choice, or overload the ezcBaseFile class and provide a new
+findRecursiveCallback() method. The code below uses
+ezcBaseFile::walkRecursive() directly in order to display dots for when ever it
+finds a new directory:
+
+.. include:: tutorial_example_04.php
+ :literal:
+
+
+
+..
+ Local Variables:
+ mode: rst
+ fill-column: 79
+ End:
+ vim: et syn=rst tw=79
20 vendors/ezc/Base/docs/tutorial_autoload.php
@@ -0,0 +1,20 @@
+<?php
+$dir = dirname( __FILE__ );
+$dirParts = explode( DIRECTORY_SEPARATOR, $dir );
+switch ( $dirParts[count( $dirParts ) - 3] )
+{
+ case 'doc': require_once 'ezc/Base/base.php'; break; // pear
+ case 'trunk': require_once "$dir/../../Base/src/base.php"; break; // svn
+ default: require_once "$dir/../../Base/src/base.php"; break; // bundle
+}
+
+/**
+ * Autoload ezc classes
+ *