From 355c93800d4d2b4e2a02ca39c04a01ae274fc3bf Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Wed, 7 May 2014 01:29:03 +0200 Subject: [PATCH] restructure app docs --- developer_manual/app/api.rst | 4 + .../app/app/acceptancetesting.rst | 7 - developer_manual/app/app/api/index.rst | 11 - developer_manual/app/app/api/ocs.rst | 21 - developer_manual/app/app/api/ocs_result.rst | 28 -- developer_manual/app/app/api/templates.rst | 405 ------------------ developer_manual/app/app/api/view.rst | 362 ---------------- developer_manual/app/app/css.rst | 47 -- developer_manual/app/app/data-migration.rst | 126 ------ developer_manual/app/app/database.rst | 46 -- developer_manual/app/app/externalapi.rst | 95 ---- developer_manual/app/app/filesystem.rst | 7 - developer_manual/app/app/index.rst | 21 - developer_manual/app/app/routes.rst | 66 --- developer_manual/app/app/static.rst | 18 - developer_manual/app/app/tutorial.rst | 86 ---- developer_manual/app/appframework/api/app.rst | 27 -- .../api/controller_controller.rst | 118 ----- .../app/appframework/api/core_api.rst | 361 ---------------- .../api/db_doesnotexistexception.rst | 22 - .../app/appframework/api/db_entity.rst | 97 ----- .../app/appframework/api/db_mapper.rst | 82 ---- .../db_multipleobjectsreturnedexception.rst | 22 - .../api/dependencyinjection_dicontainer.rst | 24 -- .../app/appframework/api/http_dispatcher.rst | 30 -- .../api/http_downloadresponse.rst | 24 -- .../api/http_forbiddenresponse.rst | 20 - .../app/appframework/api/http_http.rst | 36 -- .../appframework/api/http_jsonresponse.rst | 62 --- .../api/http_notfoundresponse.rst | 20 - .../api/http_redirectresponse.rst | 27 -- .../app/appframework/api/http_request.rst | 102 ----- .../app/appframework/api/http_response.rst | 85 ---- .../api/http_templateresponse.rst | 99 ----- .../api/http_textdownloadresponse.rst | 31 -- .../appframework/api/http_textresponse.rst | 30 -- .../appframework/api/http_twigresponse.rst | 33 -- .../app/appframework/api/index.rst | 106 ----- .../api/middleware_middleware.rst | 62 --- .../api/middleware_middlewaredispatcher.rst | 81 ---- .../middleware_security_securityexception.rst | 28 -- ...middleware_security_securitymiddleware.rst | 44 -- .../api/middleware_twig_twigmiddleware.rst | 45 -- .../api/utility_controllertestutility.rst | 50 --- .../api/utility_faviconfetcher.rst | 63 --- .../api/utility_mappertestutility.rst | 45 -- .../api/utility_methodannotationreader.rst | 29 -- .../api/utility_simplepieapifactory.rst | 37 -- .../appframework/api/utility_testutility.rst | 26 -- .../appframework/api/utility_timefactory.rst | 19 - .../app/appframework/classloader.rst | 1 - .../app/appframework/controllers.rst | 148 ------- developer_manual/app/appframework/css.rst | 1 - .../app/appframework/data-migration.rst | 1 - .../app/appframework/database.rst | 157 ------- .../app/appframework/filesystem.rst | 1 - developer_manual/app/appframework/hooks.rst | 1 - developer_manual/app/appframework/index.rst | 27 -- developer_manual/app/appframework/info.rst | 1 - .../app/appframework/middleware.rst | 69 --- developer_manual/app/appframework/routes.rst | 69 --- developer_manual/app/appframework/schema.rst | 1 - developer_manual/app/appframework/static.rst | 1 - .../app/appframework/templates.rst | 185 -------- .../app/appframework/tutorial.rst | 181 -------- .../app/appframework/unittesting.rst | 157 ------- developer_manual/app/backgroundjobs.rst | 4 + developer_manual/app/classloader.rst | 5 +- developer_manual/app/container.rst | 118 ++--- developer_manual/app/controllers.rst | 4 + developer_manual/app/css.rst | 4 + developer_manual/app/database.rst | 4 + developer_manual/app/filesystem.rst | 4 + developer_manual/app/filesystembackend.rst | 4 + developer_manual/app/{app => }/hooks.rst | 2 + developer_manual/app/index.rst | 48 ++- developer_manual/app/{app => }/info.rst | 48 +-- developer_manual/app/intro/index.rst | 8 - developer_manual/app/js.rst | 4 + developer_manual/app/l10n.rst | 4 + developer_manual/app/main.rst | 8 +- developer_manual/app/middleware.rst | 4 + developer_manual/app/routes.rst | 4 + developer_manual/app/{app => }/schema.rst | 4 +- developer_manual/app/{app => }/templates.rst | 2 +- developer_manual/app/testing.rst | 4 + developer_manual/app/userbackend.rst | 4 + developer_manual/app/users.rst | 4 + 88 files changed, 145 insertions(+), 4488 deletions(-) create mode 100644 developer_manual/app/api.rst delete mode 100644 developer_manual/app/app/acceptancetesting.rst delete mode 100644 developer_manual/app/app/api/index.rst delete mode 100644 developer_manual/app/app/api/ocs.rst delete mode 100644 developer_manual/app/app/api/ocs_result.rst delete mode 100644 developer_manual/app/app/api/templates.rst delete mode 100644 developer_manual/app/app/api/view.rst delete mode 100644 developer_manual/app/app/css.rst delete mode 100644 developer_manual/app/app/data-migration.rst delete mode 100644 developer_manual/app/app/database.rst delete mode 100644 developer_manual/app/app/externalapi.rst delete mode 100644 developer_manual/app/app/filesystem.rst delete mode 100644 developer_manual/app/app/index.rst delete mode 100644 developer_manual/app/app/routes.rst delete mode 100644 developer_manual/app/app/static.rst delete mode 100644 developer_manual/app/app/tutorial.rst delete mode 100644 developer_manual/app/appframework/api/app.rst delete mode 100644 developer_manual/app/appframework/api/controller_controller.rst delete mode 100644 developer_manual/app/appframework/api/core_api.rst delete mode 100644 developer_manual/app/appframework/api/db_doesnotexistexception.rst delete mode 100644 developer_manual/app/appframework/api/db_entity.rst delete mode 100644 developer_manual/app/appframework/api/db_mapper.rst delete mode 100644 developer_manual/app/appframework/api/db_multipleobjectsreturnedexception.rst delete mode 100644 developer_manual/app/appframework/api/dependencyinjection_dicontainer.rst delete mode 100644 developer_manual/app/appframework/api/http_dispatcher.rst delete mode 100644 developer_manual/app/appframework/api/http_downloadresponse.rst delete mode 100644 developer_manual/app/appframework/api/http_forbiddenresponse.rst delete mode 100644 developer_manual/app/appframework/api/http_http.rst delete mode 100644 developer_manual/app/appframework/api/http_jsonresponse.rst delete mode 100644 developer_manual/app/appframework/api/http_notfoundresponse.rst delete mode 100644 developer_manual/app/appframework/api/http_redirectresponse.rst delete mode 100644 developer_manual/app/appframework/api/http_request.rst delete mode 100644 developer_manual/app/appframework/api/http_response.rst delete mode 100644 developer_manual/app/appframework/api/http_templateresponse.rst delete mode 100644 developer_manual/app/appframework/api/http_textdownloadresponse.rst delete mode 100644 developer_manual/app/appframework/api/http_textresponse.rst delete mode 100644 developer_manual/app/appframework/api/http_twigresponse.rst delete mode 100644 developer_manual/app/appframework/api/index.rst delete mode 100644 developer_manual/app/appframework/api/middleware_middleware.rst delete mode 100644 developer_manual/app/appframework/api/middleware_middlewaredispatcher.rst delete mode 100644 developer_manual/app/appframework/api/middleware_security_securityexception.rst delete mode 100644 developer_manual/app/appframework/api/middleware_security_securitymiddleware.rst delete mode 100644 developer_manual/app/appframework/api/middleware_twig_twigmiddleware.rst delete mode 100644 developer_manual/app/appframework/api/utility_controllertestutility.rst delete mode 100644 developer_manual/app/appframework/api/utility_faviconfetcher.rst delete mode 100644 developer_manual/app/appframework/api/utility_mappertestutility.rst delete mode 100644 developer_manual/app/appframework/api/utility_methodannotationreader.rst delete mode 100644 developer_manual/app/appframework/api/utility_simplepieapifactory.rst delete mode 100644 developer_manual/app/appframework/api/utility_testutility.rst delete mode 100644 developer_manual/app/appframework/api/utility_timefactory.rst delete mode 100644 developer_manual/app/appframework/classloader.rst delete mode 100644 developer_manual/app/appframework/controllers.rst delete mode 100644 developer_manual/app/appframework/css.rst delete mode 100644 developer_manual/app/appframework/data-migration.rst delete mode 100644 developer_manual/app/appframework/database.rst delete mode 100644 developer_manual/app/appframework/filesystem.rst delete mode 100644 developer_manual/app/appframework/hooks.rst delete mode 100644 developer_manual/app/appframework/index.rst delete mode 100644 developer_manual/app/appframework/info.rst delete mode 100644 developer_manual/app/appframework/middleware.rst delete mode 100644 developer_manual/app/appframework/routes.rst delete mode 100644 developer_manual/app/appframework/schema.rst delete mode 100644 developer_manual/app/appframework/static.rst delete mode 100644 developer_manual/app/appframework/templates.rst delete mode 100644 developer_manual/app/appframework/tutorial.rst delete mode 100644 developer_manual/app/appframework/unittesting.rst create mode 100644 developer_manual/app/backgroundjobs.rst create mode 100644 developer_manual/app/controllers.rst create mode 100644 developer_manual/app/css.rst create mode 100644 developer_manual/app/database.rst create mode 100644 developer_manual/app/filesystem.rst create mode 100644 developer_manual/app/filesystembackend.rst rename developer_manual/app/{app => }/hooks.rst (97%) rename developer_manual/app/{app => }/info.rst (59%) delete mode 100644 developer_manual/app/intro/index.rst create mode 100644 developer_manual/app/js.rst create mode 100644 developer_manual/app/l10n.rst create mode 100644 developer_manual/app/middleware.rst create mode 100644 developer_manual/app/routes.rst rename developer_manual/app/{app => }/schema.rst (88%) rename developer_manual/app/{app => }/templates.rst (92%) create mode 100644 developer_manual/app/testing.rst create mode 100644 developer_manual/app/userbackend.rst create mode 100644 developer_manual/app/users.rst diff --git a/developer_manual/app/api.rst b/developer_manual/app/api.rst new file mode 100644 index 000000000..942e609b7 --- /dev/null +++ b/developer_manual/app/api.rst @@ -0,0 +1,4 @@ +RESTful API +=========== + +.. sectionauthor:: Bernhard Posselt \ No newline at end of file diff --git a/developer_manual/app/app/acceptancetesting.rst b/developer_manual/app/app/acceptancetesting.rst deleted file mode 100644 index 679deacf5..000000000 --- a/developer_manual/app/app/acceptancetesting.rst +++ /dev/null @@ -1,7 +0,0 @@ -Acceptance Tests -================ - -https://github.com/cucumber/cucumber/wiki/Given-When-Then -http://www.elabs.se/blog/15-you-re-cuking-it-wrong -https://github.com/cucumber/cucumber/wiki/Cucumber-Backgrounder -https://github.com/jnicklas/capybara#capybara \ No newline at end of file diff --git a/developer_manual/app/app/api/index.rst b/developer_manual/app/app/api/index.rst deleted file mode 100644 index fad85d89a..000000000 --- a/developer_manual/app/app/api/index.rst +++ /dev/null @@ -1,11 +0,0 @@ -============ -ownCloud API -============ - -.. toctree:: - :maxdepth: 1 - - ocs - ocs_result - templates - view diff --git a/developer_manual/app/app/api/ocs.rst b/developer_manual/app/app/api/ocs.rst deleted file mode 100644 index e147e3db1..000000000 --- a/developer_manual/app/app/api/ocs.rst +++ /dev/null @@ -1,21 +0,0 @@ -OCS -=== - -.. sectionauthor:: Tom Needham - -Manages the backend of the external API - -.. php:namespace:: OCP -.. php:class:: API - - .. php:method:: register($method, $url, $action, $app, $authlevel, $defaults, $requirements) - - Registers an API route with the backend. - - :param string $method: The HTTP method (get, post, put or delete) - :param string $url: The URL that defines the API route which can also include params (See the `Symfony Documentation `_) - :param callable $action: The function to call - :param string $app: The app id - :param int $authlevel: The required level of authentication to access the API method. The following constants can be passed: OC_API::ADMIN_AUTH, OC_API::SUBADMIN_AUTH, OC_API::USER_AUTH, OC_API::GUEST_AUTH - :param array $defaults: associative array of defaults for the URL parameters. Keys are the parameter names as defined in the url - :param array $requirements: associative array of requirements for the url parameters (See the `Symfony Documentation: Adding Requirements `_) \ No newline at end of file diff --git a/developer_manual/app/app/api/ocs_result.rst b/developer_manual/app/app/api/ocs_result.rst deleted file mode 100644 index 02316ad54..000000000 --- a/developer_manual/app/app/api/ocs_result.rst +++ /dev/null @@ -1,28 +0,0 @@ -OCS_Result -========== - -.. sectionauthor:: Tom Needham - -Holds data on the result of the API method. - -.. php:class:: OC_OCS_Result - - .. php:method:: __construct($data=null, $code=100, $message=null) - - Creates an OC_OCS_Result object - - :param mixed $data: The data you wish to return, this may be a string, integer or array - :param int $code: The response code you wish to return, defaults to success (100) - :param string $message: An optional message to return with the response (explaining the result) - - .. php:method:: setTotalItems($items) - - Sets the value in the response. Use this to inform the client of the range of data available. - - :param int $items: The number of items in the full data set - - .. php:method:: setItemsPerPage($items) - - Sets the value in the response. Use this to inform the client of the number of pieces of data per page. - - :param int $items: The number of items per page of data. diff --git a/developer_manual/app/app/api/templates.rst b/developer_manual/app/app/api/templates.rst deleted file mode 100644 index 45233fbd7..000000000 --- a/developer_manual/app/app/api/templates.rst +++ /dev/null @@ -1,405 +0,0 @@ -OC Templates -============ -.. sectionauthor:: Bernhard Posselt - -OC_Template ------------ - -.. php:class:: OC_Template - - - This class provides the templates for owncloud. It is used for loading template files, assign variables to it and render the whole template. - - .. php:method:: __construct($app, $name[, $renderas]) - - :param string $app: the name of the app - :param string $file: name of the template file (without suffix) - :param string $renderas: If $renderas is set, OC_Template will try to produce a full page in the according layout. For now, renderas can be set to "guest", "user" or "admin" - :returns: OC_Template object - - **Example:** - - .. code-block:: php - - - - - .. php:method:: addHeader($tag, $attributes[, $text='']) - - :param string $tag: tag name of the element - :param array $attributes: array of attrobutes for the element - :param string $text: the text content for the element - - Add a custom element to the html - - **Example:** - - .. code-block:: php - - addHeader('title', array(), 'My new Page'); - ?> - - .. php:method:: append($key, $value) - - :param string $key: the key under which the variable can be accessed in the template - :param $value: the value that we want to pass - :returns: bool - - This function assigns a variable in an array context. If the key already exists, the value will be appended. It can be accessed via $_[$key][$position] in the template. - - **Example:** - - .. code-block:: php - - assign('customers', $customers); - $mainTemplate->append('customers', 'hanna'); - ?> - - - .. php:method:: assign($key, $value) - - :param string $key: the key under which the variable can be accessed in the template - :param $value: the value that we want to pass - :returns: bool - - This function assigns a variable. It can be accessed via $_[$key] in the template. If the key existed before, it will be overwritten - - **Example:** - - .. code-block:: php - - assign('customers', $customers); - ?> - - - .. php:method:: detectFormfactor() - - :returns: The mode of the client as a string. **default** -> the normal desktop browser interface, **mobile** -> interface for smartphones, **tablet** -> interface for tablets, **standalone** -> the default interface but without header, footer and sidebar, just the application. Useful to use just a specific app on the desktop in a standalone window. - - **Example:** - - .. code-block:: php - - detectFormfactor(); - ?> - - - .. php:method:: fetchPage() - - :returns: the HTML of the template as string - - This function proceeds the template and but prints no output. - - **Example:** - - .. todo:: provide example - - - .. php:method:: getFormFactorExtension() - - :returns: Returns the formfactor extension for current formfactor (like .mobile or .tablet) - - - **Example:** - - .. code-block:: php - - detectFormfactorExtension(); - ?> - - - .. php:method:: inc($file[, $additionalparams]) - - :param string $file: the name of the template - :param array $additionalparams: an array with additional variables which should be used for the included template - :returns: returns content of included template as a string - - Includes another template. use inc('template')); ?> to do this. The included template has access to all parent template variables! - - **Example:** - - .. code-block:: php - -
- inc('nav.inc', array('active' => 'nav_entry_1')); ?> -
- - - .. php:method:: printPage() - - :returns: true when there is content to print - - This function proceeds the template and prints its output. - - **Example:** - - .. code-block:: php - - assign('test', array("test", "test2")); - $mainTemplate->printPage(); - ?> - - .. php:method:: printAdminPage($application, $name[, $parameters]) - - :param string $application: The application we render the template for - :param string $name: Name of the template - :param array $parameters: Parameters for the template - :returns: bool - - Shortcut to print a simple page for admin - - **Example:** - - .. todo:: provide example - - - .. php:method:: printGuestPage($application, $name[, $parameters]) - - :param string $application: The application we render the template for - :param string $name: Name of the template - :param array $parameters: Parameters for the template - :returns: bool - - Shortcut to print a simple page for guests - - **Example:** - - .. todo:: provide example - - - .. php:method:: printUserPage($application, $name[, $parameters]) - - :param string $application: The application we render the template for - :param string $name: Name of the template - :param array $parameters: Parameters for the template - :returns: bool - - Shortcut to print a simple page for users - - **Example:** - - .. todo:: provide example - - - -Template functions ------------------- - -These functions are automatically available in all templates. - -html_select_options -~~~~~~~~~~~~~~~~~~~ -.. php:function:: html_select_options($options, $selected[, $params]) - - :param array $options: an array of the form value => label - :param string/array $selected: an array containing strings or a simple string which sets a value as selected - :param array $params: optional parameters that are done in key => value - :returns: the html as string of preset