Permalink
Browse files

Merging with trunk

  • Loading branch information...
2 parents dec1088 + df5218d commit 27c63486c18752f34a73ca6e0b8598dbca76d607 @chdemko committed Apr 17, 2012
Showing with 3,974 additions and 2,447 deletions.
  1. +99 −102 build.xml
  2. +0 −2 build/changelog.php
  3. +69 −0 docs/manual/en-US/chapters/classes/jcontrollerbase.xml
  4. +51 −0 docs/manual/en-US/chapters/classes/jmodelbase.xml
  5. +73 −0 docs/manual/en-US/chapters/classes/jmodeldatabase.xml
  6. +75 −0 docs/manual/en-US/chapters/classes/jviewbase.xml
  7. +83 −0 docs/manual/en-US/chapters/classes/jviewhtml.xml
  8. +13 −0 docs/manual/en-US/chapters/interfaces/jcontroller.xml
  9. +12 −0 docs/manual/en-US/chapters/interfaces/jmodel.xml
  10. +12 −0 docs/manual/en-US/chapters/interfaces/jview.xml
  11. +2 −0 docs/manual/en-US/chapters/packages.xml
  12. +1 −1 docs/manual/en-US/chapters/packages/database.xml
  13. +57 −0 docs/manual/en-US/chapters/packages/mvc.xml
  14. +29 −0 legacy.xml.dist
  15. +3 −3 libraries/import.legacy.php
  16. +15 −5 libraries/joomla/access/access.php
  17. +18 −8 libraries/joomla/application/base.php
  18. +2 −2 libraries/joomla/application/cli.php
  19. +2 −2 libraries/joomla/application/daemon.php
  20. +1 −1 libraries/joomla/application/web.php
  21. +34 −1 libraries/joomla/application/web/client.php
  22. +16 −20 libraries/joomla/archive/archive.php
  23. +58 −55 libraries/joomla/archive/bzip2.php
  24. +67 −22 libraries/joomla/archive/gzip.php
  25. +35 −13 libraries/joomla/archive/tar.php
  26. +114 −55 libraries/joomla/archive/zip.php
  27. +1 −2 libraries/joomla/cache/cache.php
  28. +2 −2 libraries/joomla/cache/controller.php
  29. +4 −2 libraries/joomla/cache/storage.php
  30. +2 −2 libraries/joomla/cache/storage/memcache.php
  31. +2 −2 libraries/joomla/cache/storage/memcached.php
  32. +0 −12 libraries/joomla/client/ftp.php
  33. +10 −2 libraries/joomla/client/helper.php
  34. +137 −0 libraries/joomla/controller/base.php
  35. +51 −0 libraries/joomla/controller/controller.php
  36. +2 −0 libraries/joomla/crypt/cipher/simple.php
  37. +17 −0 libraries/joomla/database/database.php
  38. +15 −13 libraries/joomla/database/driver.php
  39. +3 −3 libraries/joomla/database/driver/mysql.php
  40. +3 −15 libraries/joomla/database/driver/mysqli.php
  41. +2 −2 libraries/joomla/database/driver/pdo.php
  42. +6 −6 libraries/joomla/database/driver/postgresql.php
  43. +3 −15 libraries/joomla/database/driver/sqlsrv.php
  44. +1 −1 libraries/joomla/database/exception.php
  45. +3 −3 libraries/joomla/database/exporter/mysql.php
  46. +7 −7 libraries/joomla/database/exporter/postgresql.php
  47. +5 −23 libraries/joomla/database/factory.php
  48. +3 −3 libraries/joomla/database/importer/mysql.php
  49. +7 −7 libraries/joomla/database/importer/postgresql.php
  50. +2 −5 libraries/joomla/{utilities → date}/date.php
  51. +4 −4 libraries/joomla/document/document.php
  52. +0 −1 libraries/joomla/document/html/html.php
  53. +5 −2 libraries/joomla/environment/uri.php
  54. +8 −7 libraries/joomla/event/dispatcher.php
  55. +1 −1 libraries/joomla/factory.php
  56. +10 −10 libraries/joomla/filesystem/folder.php
  57. +6 −6 libraries/joomla/filesystem/patcher.php
  58. +74 −74 libraries/joomla/filesystem/stream.php
  59. +31 −31 libraries/joomla/filesystem/streams/string.php
  60. +8 −8 libraries/joomla/form/field.php
  61. +0 −7 libraries/joomla/form/fields/plugins.php
  62. +0 −5 libraries/joomla/form/fields/rules.php
  63. +0 −7 libraries/joomla/form/fields/sql.php
  64. +79 −101 libraries/joomla/form/form.php
  65. +7 −7 libraries/joomla/form/rule.php
  66. +7 −7 libraries/joomla/form/rules/color.php
  67. +7 −14 libraries/joomla/form/rules/email.php
  68. +11 −11 libraries/joomla/form/rules/equals.php
  69. +7 −7 libraries/joomla/form/rules/options.php
  70. +9 −9 libraries/joomla/form/rules/rules.php
  71. +7 −7 libraries/joomla/form/rules/tel.php
  72. +7 −7 libraries/joomla/form/rules/url.php
  73. +7 −13 libraries/joomla/form/rules/username.php
  74. +0 −2 libraries/joomla/html/editor.php
  75. +7 −20 libraries/joomla/html/html.php
  76. +0 −28 libraries/joomla/html/html/access.php
  77. +1 −1 libraries/joomla/html/html/batch.php
  78. +1 −1 libraries/joomla/html/html/content.php
  79. +0 −6 libraries/joomla/html/html/contentlanguage.php
  80. +1 −1 libraries/joomla/html/html/grid.php
  81. +0 −7 libraries/joomla/html/html/list.php
  82. +0 −6 libraries/joomla/html/html/menu.php
  83. +2 −2 libraries/joomla/html/html/select.php
  84. +0 −13 libraries/joomla/html/html/user.php
  85. +14 −14 libraries/joomla/html/pagination.php
  86. +79 −30 libraries/joomla/http/http.php
  87. +16 −3 libraries/joomla/image/image.php
  88. +26 −0 libraries/joomla/input/files.php
  89. +3 −3 libraries/joomla/input/input.php
  90. +2 −21 libraries/joomla/installer/adapters/component.php
  91. +1 −1 libraries/joomla/installer/adapters/language.php
  92. +1 −1 libraries/joomla/installer/adapters/module.php
  93. +1 −1 libraries/joomla/installer/adapters/template.php
  94. +3 −3 libraries/joomla/installer/extension.php
  95. +7 −4 libraries/joomla/installer/helper.php
  96. +49 −49 libraries/joomla/installer/installer.php
  97. +13 −12 libraries/joomla/language/stemmer/porteren.php
  98. +0 −2 libraries/joomla/log/entry.php
  99. +1 −2 libraries/joomla/log/log.php
  100. +0 −5 libraries/joomla/log/loggers/database.php
  101. +33 −6 libraries/joomla/mail/mail.php
  102. +79 −0 libraries/joomla/model/base.php
  103. +82 −0 libraries/joomla/model/database.php
  104. +40 −0 libraries/joomla/model/model.php
  105. +1 −1 libraries/joomla/object/object.php
  106. +10 −16 libraries/joomla/plugin/helper.php
  107. +2 −2 libraries/joomla/registry/format.php
  108. +10 −1 libraries/joomla/session/session.php
  109. +1 −1 libraries/joomla/session/storage.php
  110. +2 −2 libraries/joomla/session/storage/apc.php
  111. +3 −3 libraries/joomla/session/storage/database.php
  112. +2 −1 libraries/joomla/session/storage/eaccelerator.php
  113. +2 −2 libraries/joomla/session/storage/memcache.php
  114. +2 −1 libraries/joomla/session/storage/memcached.php
  115. +2 −2 libraries/joomla/session/storage/wincache.php
  116. +2 −2 libraries/joomla/session/storage/xcache.php
  117. +2 −2 libraries/joomla/string/string.php
  118. +2 −14 libraries/joomla/table/asset.php
  119. +0 −7 libraries/joomla/table/extension.php
  120. +4 −20 libraries/joomla/table/menutype.php
  121. +2 −9 libraries/joomla/table/session.php
  122. +30 −160 libraries/joomla/table/table.php
  123. +5 −81 libraries/joomla/table/user.php
  124. +8 −21 libraries/joomla/table/usergroup.php
  125. +12 −13 libraries/joomla/updater/adapters/collection.php
  126. +13 −13 libraries/joomla/updater/adapters/extension.php
  127. +46 −34 libraries/joomla/updater/update.php
  128. +10 −10 libraries/joomla/updater/updateadapter.php
  129. +20 −22 libraries/joomla/user/authentication.php
  130. +10 −30 libraries/joomla/user/helper.php
  131. +7 −10 libraries/joomla/user/user.php
  132. +5 −0 libraries/joomla/utilities/xmlelement.php
  133. +56 −0 libraries/joomla/view/base.php
  134. +185 −0 libraries/joomla/view/html.php
  135. +41 −0 libraries/joomla/view/view.php
  136. +1 −37 libraries/legacy/application/application.php
  137. +4 −12 libraries/legacy/application/helper.php
  138. +23 −0 libraries/{joomla → legacy}/base/node.php
  139. +14 −2 libraries/{joomla → legacy}/base/tree.php
  140. +3 −136 libraries/legacy/categories/categories.php
  141. +3 −12 libraries/{joomla/application → legacy}/component/helper.php
  142. +4 −4 libraries/{joomla/application/component/controlleradmin.php → legacy/controller/admin.php}
  143. +9 −7 libraries/{joomla/application/component → legacy/controller}/controller.php
  144. +13 −12 libraries/{joomla/application/component/controllerform.php → legacy/controller/form.php}
  145. +32 −0 libraries/legacy/dispatcher/dispatcher.php
  146. +0 −2 libraries/legacy/error/error.php
  147. 0 libraries/{joomla/form/fields → legacy/form/field}/category.php
  148. +1 −7 libraries/{joomla/form/fields → legacy/form/field}/componentlayout.php
  149. +25 −23 libraries/legacy/form/field/media.php
  150. 0 libraries/{joomla/form/fields → legacy/form/field}/menu.php
  151. +1 −7 libraries/{joomla/form/fields → legacy/form/field}/modulelayout.php
  152. +0 −105 libraries/legacy/form/field/templatestyle.php
  153. +2 −2 libraries/legacy/help/help.php
  154. +2 −29 libraries/legacy/menu/menu.php
  155. +6 −8 libraries/{joomla/application/component/modeladmin.php → legacy/model/admin.php}
  156. +3 −14 libraries/{joomla/application/component/modelform.php → legacy/model/form.php}
  157. +2 −22 libraries/{joomla/application/component/modelitem.php → legacy/model/item.php}
  158. +5 −6 libraries/{joomla/application/component/modellist.php → legacy/model/list.php}
  159. +4 −22 libraries/{joomla/application/component → legacy/model}/model.php
  160. +6 −7 libraries/{joomla/application → legacy}/module/helper.php
  161. +2 −14 libraries/legacy/pathway/pathway.php
  162. +3 −3 libraries/legacy/request/request.php
  163. +4 −4 libraries/{joomla/utilities → legacy/simplecrypt}/simplecrypt.php
  164. +5 −101 libraries/{joomla/application/component → legacy/view}/view.php
  165. +16 −14 phpunit.xml.dist
  166. +70 −0 tests/bootstrap.legacy.php
  167. +1 −1 tests/bootstrap.php
  168. +35 −17 tests/core/case/case.php
  169. +20 −11 tests/core/case/database.php
  170. +3 −0 tests/core/mock/application.php
  171. +2 −1 tests/core/mock/application/web.php
  172. +54 −0 tests/core/mock/controller.php
  173. +4 −4 tests/core/mock/dispatcher.php
  174. 0 tests/suites/{unit → }/legacy/application/JApplicationHelperTest.php
  175. 0 tests/suites/{unit → }/legacy/application/JApplicationTest.php
  176. 0 tests/suites/{unit → }/legacy/categories/JCategoriesTest.php
  177. 0 tests/suites/{unit → }/legacy/categories/JCategoryNodeTest.php
  178. +0 −2 tests/suites/{unit/joomla/application → legacy}/component/JComponentHelperTest.php
  179. +0 −2 tests/suites/{unit/joomla/application/component → legacy/controller}/JControllerAdminTest.php
  180. +1 −1 tests/suites/{unit/joomla/application/component → legacy/controller}/JControllerFormTest.php
  181. +20 −4 tests/suites/{unit/joomla/application/component → legacy/controller}/JControllerTest.php
  182. 0 ...ites/{unit/joomla/application/component → legacy/controller}/stubs/component1/controller.json.php
  183. 0 tests/suites/{unit/joomla/application/component → legacy/controller}/stubs/component2/controller.php
  184. 0 tests/suites/{unit/joomla/application/component → legacy/controller}/stubs/controller.php
  185. 0 tests/suites/{unit/joomla/application/component → legacy/controller}/stubs/controllerform.php
  186. 0 tests/suites/{unit → }/legacy/error/JErrorInspector.php
  187. 0 tests/suites/{unit → }/legacy/error/JErrorTest.php
  188. 0 tests/suites/{unit → }/legacy/exception/JExceptionTest.php
  189. +3 −14 tests/suites/{unit/joomla/form/fields → legacy/form/field}/JFormFieldCategoryTest.php
  190. +3 −14 tests/suites/{unit/joomla/form/fields → legacy/form/field}/JFormFieldComponentLayoutTest.php
  191. +2 −10 tests/suites/{unit → }/legacy/form/field/JFormFieldHelpsiteTest.php
  192. +2 −9 tests/suites/{unit → }/legacy/form/field/JFormFieldMediaTest.php
  193. +3 −14 tests/suites/{unit/joomla/form/fields → legacy/form/field}/JFormFieldModuleLayoutTest.php
  194. +2 −9 tests/suites/{unit → }/legacy/form/field/JFormFieldUserTest.php
  195. 0 tests/suites/{unit → }/legacy/menu/JMenuTest.php
  196. +0 −2 tests/suites/{unit/joomla/application/component → legacy/model}/JModelAdminTest.php
  197. +0 −2 tests/suites/{unit/joomla/application/component → legacy/model}/JModelFormTest.php
  198. +0 −2 tests/suites/{unit/joomla/application/component → legacy/model}/JModelItemTest.php
  199. +0 −2 tests/suites/{unit/joomla/application/component → legacy/model}/JModelListTest.php
  200. +0 −2 tests/suites/{unit/joomla/application/component → legacy/model}/JModelTest.php
  201. +0 −2 tests/suites/{unit/joomla/application → legacy}/module/JModuleHelperTest.php
  202. 0 tests/suites/{unit → }/legacy/pathway/JPathwayTest.php
  203. 0 tests/suites/{unit → }/legacy/pathway/stubs/includes/pathway.php
  204. 0 tests/suites/{unit → }/legacy/request/JFilterInput-mock-general.php
  205. 0 tests/suites/{unit → }/legacy/request/JRequest-helper-dataset.php
  206. 0 tests/suites/{unit → }/legacy/request/JRequestGetVarTest.php
  207. 0 tests/suites/{unit → }/legacy/request/JRequestGetmethodTest.php
  208. 0 tests/suites/{unit → }/legacy/request/JRequestTest.php
  209. +6 −4 tests/suites/{unit/joomla/utilities → legacy/simplecrypt}/JSimpleCryptTest.php
  210. +1 −1 tests/suites/{unit → }/legacy/table/JTableContentTest.php
  211. 0 tests/suites/{unit → }/legacy/table/stubs/jos_content.csv
  212. 0 tests/suites/{unit → }/legacy/toolbar/JToolbarButtonTest.php
  213. 0 tests/suites/{unit → }/legacy/toolbar/JToolbarTest.php
  214. 0 tests/suites/{unit → }/legacy/toolbar/button/JButtonConfirmTest.php
  215. 0 tests/suites/{unit → }/legacy/toolbar/button/JButtonCustomTest.php
  216. 0 tests/suites/{unit → }/legacy/toolbar/button/JButtonHelpTest.php
  217. 0 tests/suites/{unit → }/legacy/toolbar/button/JButtonLinkTest.php
  218. 0 tests/suites/{unit → }/legacy/toolbar/button/JButtonPopupTest.php
  219. 0 tests/suites/{unit → }/legacy/toolbar/button/JButtonSeparatorTest.php
  220. 0 tests/suites/{unit → }/legacy/toolbar/button/JButtonStandardTest.php
  221. +25 −14 tests/suites/{unit/joomla/application/component → legacy/view}/JViewTest.php
  222. +0 −2 tests/suites/unit/joomla/access/JAccessTest.php
  223. +4 −4 tests/suites/unit/joomla/application/JApplicationBaseTest.php
  224. +2 −2 tests/suites/unit/joomla/application/JApplicationCliTest.php
  225. +7 −7 tests/suites/unit/joomla/application/JApplicationWebTest.php
  226. +7 −1 tests/suites/unit/joomla/application/web/JApplicationWebClientTest.php
  227. +186 −0 tests/suites/unit/joomla/controller/JControllerBaseTest.php
  228. +31 −0 tests/suites/unit/joomla/controller/stubs/tbase.php
  229. +3 −3 tests/suites/unit/joomla/database/database/JDatabaseExporterMySqlTest.php
  230. +4 −4 tests/suites/unit/joomla/database/database/JDatabaseExporterPostgresqlTest.php
  231. +3 −3 tests/suites/unit/joomla/database/database/JDatabaseImporterMySqlTest.php
  232. +8 −8 tests/suites/unit/joomla/database/database/JDatabaseImporterPostgresqlTest.php
  233. +16 −4 tests/suites/unit/joomla/{utilities → date}/JDateTest.php
  234. +2 −19 tests/suites/unit/joomla/document/opensearch/JDocumentOpensearchTest.php
  235. +3 −3 tests/suites/unit/joomla/event/{JDispatcherInspector.php → JEventDispatcherInspector.php}
  236. +41 −30 tests/suites/unit/joomla/event/{JDispatcherTest.php → JEventDispatcherTest.php}
  237. +3 −3 tests/suites/unit/joomla/event/JEventInspector.php
  238. +3 −3 tests/suites/unit/joomla/event/JEventTest.php
  239. +41 −42 tests/suites/unit/joomla/form/JFormTest.php
  240. +5 −0 tests/suites/unit/joomla/html/JHtmlTest.php
  241. +2 −0 tests/suites/unit/joomla/html/html/JHtmlFormTest.php
  242. +1 −1 tests/suites/unit/joomla/language/JLanguageInspector.php
  243. +20 −5 tests/suites/unit/joomla/mail/JMailTest.php
  244. +101 −0 tests/suites/unit/joomla/model/JModelBaseTest.php
  245. +122 −0 tests/suites/unit/joomla/model/JModelDatabaseTest.php
  246. +19 −0 tests/suites/unit/joomla/model/stubs/tbase.php
  247. +19 −0 tests/suites/unit/joomla/model/stubs/tdatabase.php
  248. +4 −4 tests/suites/unit/joomla/user/JAuthenticationTest.php
  249. +0 −3 tests/suites/unit/joomla/user/JUserTest.php
  250. +69 −0 tests/suites/unit/joomla/view/JViewBaseTest.php
  251. +211 −0 tests/suites/unit/joomla/view/JViewHtmlTest.php
  252. +1 −0 tests/suites/unit/joomla/view/layouts1/fringe/division.php
  253. +1 −0 tests/suites/unit/joomla/view/layouts1/olivia.php
  254. +1 −0 tests/suites/unit/joomla/view/layouts1/peter.php
  255. +1 −0 tests/suites/unit/joomla/view/layouts2/fauxlivia.php
  256. +1 −0 tests/suites/unit/joomla/view/layouts2/olivia.php
  257. +48 −0 tests/suites/unit/joomla/view/mocks/JModelMock.php
  258. +30 −0 tests/suites/unit/joomla/view/stubs/tbase.php
  259. +19 −0 tests/suites/unit/joomla/view/stubs/thtml.php
  260. +1 −1 tests/suites/unit/{joomla → legacy}/base/JNodeTest.php
  261. +1 −1 tests/suites/unit/{joomla → legacy}/base/JTreeTest.php
  262. +0 −49 tests/suites/unit/legacy/form/field/JFormFieldTemplateStyleTest.php
View
201 build.xml
@@ -1,118 +1,115 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="joomla-platform" default="build" basedir=".">
- <property name="source" value="libraries"/>
- <property name="joomlasource" value="libraries/joomla,libraries/platform.php,libraries/loader.php,libraries/import.php"/>
+ <property name="source" value="libraries" />
+ <property name="joomlasource" value="libraries/joomla,libraries/platform.php,libraries/loader.php,libraries/import.php" />
- <target name="clean"
- description="Clean up and create artifact directories">
- <delete dir="${basedir}/build/api"/>
- <delete dir="${basedir}/build/code-browser"/>
- <delete dir="${basedir}/build/coverage"/>
- <delete dir="${basedir}/build/logs"/>
- <delete dir="${basedir}/build/pdepend"/>
+ <target name="clean" description="Clean up and create artifact directories">
+ <delete dir="${basedir}/build/api" />
+ <delete dir="${basedir}/build/code-browser" />
+ <delete dir="${basedir}/build/coverage" />
+ <delete dir="${basedir}/build/logs" />
+ <delete dir="${basedir}/build/pdepend" />
- <mkdir dir="${basedir}/build/api"/>
- <mkdir dir="${basedir}/build/code-browser"/>
- <mkdir dir="${basedir}/build/coverage"/>
- <mkdir dir="${basedir}/build/logs"/>
- <mkdir dir="${basedir}/build/pdepend"/>
- </target>
+ <mkdir dir="${basedir}/build/api" />
+ <mkdir dir="${basedir}/build/code-browser" />
+ <mkdir dir="${basedir}/build/coverage" />
+ <mkdir dir="${basedir}/build/logs" />
+ <mkdir dir="${basedir}/build/pdepend" />
+ </target>
- <target name="phpunit"
- description="Run unit tests using PHPUnit and generates junit.xml and clover.xml">
- <exec executable="phpunit"/>
- </target>
+ <target name="phpunit" description="Run unit tests using PHPUnit and generates junit.xml and clover.xml">
+ <exec executable="phpunit" />
+ </target>
- <target name="parallelTasks"
- description="Run the pdepend, phpmd, phpcpd, phpcs, phpdoc and phploc tasks in parallel using a maximum of 2 threads.">
- <parallel threadCount="2">
- <sequential>
- <antcall target="pdepend"/>
- <antcall target="phpmd"/>
- </sequential>
- <antcall target="phpcpd"/>
- <antcall target="phpcs"/>
- <antcall target="phpdoc"/>
- <antcall target="phploc"/>
- </parallel>
- </target>
+ <target name="phpunit-legacy" description="Run legacy tests using PHPUnit and generates junit.legacy.xml and clover.legacy.xml">
+ <exec executable="phpunit">
+ <arg value="-c" />
+ <arg value="legacy.xml.dist" />
+ </exec>
+ </target>
- <target name="pdepend"
- description="Generate jdepend.xml and software metrics charts using PHP_Depend">
- <exec executable="pdepend">
- <arg value="--jdepend-xml=${basedir}/build/logs/jdepend.xml" />
- <arg value="--jdepend-chart=${basedir}/build/pdepend/dependencies.svg" />
- <arg value="--overview-pyramid=${basedir}/build/pdepend/overview-pyramid.svg" />
- <arg path="${source}" />
- </exec>
- </target>
+ <target name="parallelTasks" description="Run the pdepend, phpmd, phpcpd, phpcs, phpdoc and phploc tasks in parallel using a maximum of 2 threads.">
+ <parallel threadCount="2">
+ <sequential>
+ <antcall target="pdepend" />
+ <antcall target="phpmd" />
+ </sequential>
+ <antcall target="phpcpd" />
+ <antcall target="phpcs" />
+ <antcall target="phpdoc" />
+ <antcall target="phploc" />
+ </parallel>
+ </target>
- <target name="phpmd"
- description="Generate pmd.xml using PHPMD">
- <exec executable="phpmd">
- <arg path="${joomlasource}" />
- <arg value="xml" />
- <arg value="${basedir}/build/phpmd.xml" />
- <arg value="--reportfile" />
- <arg value="${basedir}/build/logs/pmd.xml" />
- </exec>
- </target>
+ <target name="pdepend" description="Generate jdepend.xml and software metrics charts using PHP_Depend">
+ <exec executable="pdepend">
+ <arg value="--jdepend-xml=${basedir}/build/logs/jdepend.xml" />
+ <arg value="--jdepend-chart=${basedir}/build/pdepend/dependencies.svg" />
+ <arg value="--overview-pyramid=${basedir}/build/pdepend/overview-pyramid.svg" />
+ <arg path="${source}" />
+ </exec>
+ </target>
- <target name="phpcpd"
- description="Generate pmd-cpd.xml using PHPCPD">
- <exec executable="phpcpd">
- <arg value="--log-pmd" />
- <arg value="${basedir}/build/logs/pmd-cpd.xml" />
- <arg path="${source}/joomla" />
- </exec>
- </target>
+ <target name="phpmd" description="Generate pmd.xml using PHPMD">
+ <exec executable="phpmd">
+ <arg path="${joomlasource}" />
+ <arg value="xml" />
+ <arg value="${basedir}/build/phpmd.xml" />
+ <arg value="--reportfile" />
+ <arg value="${basedir}/build/logs/pmd.xml" />
+ </exec>
+ </target>
- <target name="phploc"
- description="Generate phploc.csv">
- <exec executable="phploc">
- <arg value="--log-csv" />
- <arg value="${basedir}/build/logs/phploc.csv" />
- <arg path="${source}/joomla" />
- </exec>
- </target>
+ <target name="phpcpd" description="Generate pmd-cpd.xml using PHPCPD">
+ <exec executable="phpcpd">
+ <arg value="--log-pmd" />
+ <arg value="${basedir}/build/logs/pmd-cpd.xml" />
+ <arg path="${source}/joomla" />
+ </exec>
+ </target>
- <target name="phpcs"
- description="Generate checkstyle.xml using PHP_CodeSniffer">
- <exec executable="phpcs">
- <arg value="--report=checkstyle" />
- <arg value="--report-file=${basedir}/build/logs/checkstyle.xml" />
- <arg value="--standard=${basedir}/build/phpcs/Joomla" />
- <arg value="--ignore=${source}/phpmailer,${source}/phputf8,${source}/simplepie/,${source}/config.example.php" />
- <arg path="${source}" />
- </exec>
- </target>
+ <target name="phploc" description="Generate phploc.csv">
+ <exec executable="phploc">
+ <arg value="--log-csv" />
+ <arg value="${basedir}/build/logs/phploc.csv" />
+ <arg path="${source}/joomla" />
+ </exec>
+ </target>
- <target name="phpdoc"
- description="Generate API documentation using PHPDocumentor">
- <exec executable="phpdox">
- <arg value="-c" />
- <arg path="${source}" />
- <arg value="-d" />
- <arg path="${basedir}/build/api" />
- <arg value="-x" />
- <arg path="${basedir}/build/docs" />
- <arg value="-g" />
- <arg value="html" />
- </exec>
- </target>
+ <target name="phpcs" description="Generate checkstyle.xml using PHP_CodeSniffer">
+ <exec executable="phpcs">
+ <arg value="--report=checkstyle" />
+ <arg value="--report-file=${basedir}/build/logs/checkstyle.xml" />
+ <arg value="--standard=${basedir}/build/phpcs/Joomla" />
+ <arg value="--ignore=${source}/phpmailer,${source}/phputf8,${source}/simplepie/,${source}/config.example.php" />
+ <arg path="${source}" />
+ </exec>
+ </target>
- <target name="phpcb"
- description="Aggregate tool output with PHP_CodeBrowser">
- <exec executable="phpcb">
- <arg value="--log" />
- <arg path="${basedir}/build/logs" />
- <arg value="--source" />
- <arg path="${source}" />
- <arg value="--output" />
- <arg path="${basedir}/build/code-browser" />
- </exec>
- </target>
+ <target name="phpdoc" description="Generate API documentation using PHPDocumentor">
+ <exec executable="phpdox">
+ <arg value="-c" />
+ <arg path="${source}" />
+ <arg value="-d" />
+ <arg path="${basedir}/build/api" />
+ <arg value="-x" />
+ <arg path="${basedir}/build/docs" />
+ <arg value="-g" />
+ <arg value="html" />
+ </exec>
+ </target>
- <target name="build" depends="clean,parallelTasks,phpunit,phpcb"/>
+ <target name="phpcb" description="Aggregate tool output with PHP_CodeBrowser">
+ <exec executable="phpcb">
+ <arg value="--log" />
+ <arg path="${basedir}/build/logs" />
+ <arg value="--source" />
+ <arg path="${source}" />
+ <arg value="--output" />
+ <arg path="${basedir}/build/code-browser" />
+ </exec>
+ </target>
+
+ <target name="build" depends="clean,phpunit,phpunit-legacy,parallelTasks,phpcb" />
</project>
View
@@ -24,8 +24,6 @@
// Bootstrap the application.
require realpath('../libraries/import.php');
-jimport('joomla.application.cli');
-
/**
* Joomla Platform Changelog builder.
*
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../../Developer_Manual.ent">
+%BOOK_ENTITIES;
+]>
+<section>
+ <title>JControllerBase</title>
+
+ <section>
+ <title>Construction</title>
+
+ <para>The constructor for <classname>JControllerBase</classname> takes an optional <classname>JInput</classname> object and an
+ optional <classname>JApplciationBase</classname> object. If either is omitted, the constructor defers to the protected
+ loadInput and loadApplication methods respectively. These methods can be overriden in derived classes if the default
+ application and request input is not appropriate.</para>
+ </section>
+
+ <section>
+ <title>Usage</title>
+
+ <para>The <classname>JControllerBase</classname> class is abstract so cannot be used directly. The derived class must
+ implement the execute method to satisfy the interface requirements. Note that the execute method no longer takes a "task"
+ argument as each controller class. Multi-task controllers are still possible but not recommended. Each controller class should
+ do just one sort of 'thing', just as saving, deleting, checking in, checking out and so on. However, controllers, or even
+ models and views, have the liberty of invoking other controllers to allow for HMVC architectures.</para>
+
+ <example>
+ <title>Example controller</title>
+
+ <programlisting> /**
+ * My custom controller.
+ *
+ * @package Examples
+ *
+ * @since 12.1
+ */
+class MyController extends JControllerBase
+{
+ /**
+ * Method to execute the controller.
+ *
+ * @return void
+ *
+ * @since 12.1
+ * @throws RuntimeException
+ */
+ public function execute()
+ {
+ echo time();
+ }
+}
+
+// Instantiate the controller.
+$controller = new MyController;
+
+// Print the time.
+$controller-&gt;execute();</programlisting>
+ </example>
+ </section>
+
+ <section>
+ <title>Serialization</title>
+
+ <para>The <classname>JControllerBase</classname> class implements <interfacename>Serializable</interfacename>. When
+ serializing, only the input property is serialized. When unserializing, the input variable is unserialized and the internal
+ application property is loaded at runtime.</para>
+ </section>
+</section>
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../../Developer_Manual.ent">
+%BOOK_ENTITIES;
+]>
+<section>
+ <title>JModelBase</title>
+
+ <section>
+ <title>Construction</title>
+
+ <para>The contructor for <classname>JModelBase</classname> takes an optional <classname>JRegistry</classname> object that
+ defines the state of the model. If omitted, the contructor defers to the protected <methodname>loadState</methodname> method.
+ This method can be overriden in a derived class and takes the place of the <methodname>populateState</methodname> method used
+ in the legacy model class.</para>
+ </section>
+
+ <section>
+ <title>Usage</title>
+
+ <para>The <classname>JModelBase</classname> class is abstract so cannot be used directly. All requirements of the interface
+ are already satisfied by the base class.</para>
+
+ <example>
+ <title>Example model</title>
+
+ <programlisting> /**
+ * My custom model.
+ *
+ * @pacakge Examples
+ *
+ * @since 12.1
+ */
+class MyModel extends JModelBase
+{
+ /**
+ * Get the time.
+ *
+ * @return integer
+ *
+ * @since 12.1
+ */
+ public function getTime()
+ {
+ return time();
+ }
+}</programlisting>
+ </example>
+ </section>
+</section>
Oops, something went wrong.

0 comments on commit 27c6348

Please sign in to comment.