[Pkg-owncloud-commits] [owncloud-doc] 31/270: restructure app docs
David Prévot
taffit at moszumanska.debian.org
Thu Jul 31 03:52:57 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud-doc.
commit 355c93800d4d2b4e2a02ca39c04a01ae274fc3bf
Author: Bernhard Posselt <dev at bernhard-posselt.com>
Date: Wed May 7 01:29:03 2014 +0200
restructure app docs
---
developer_manual/app/api.rst | 4 +
developer_manual/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 --
.../app/appframework/api/controller_controller.rst | 118 ------
developer_manual/app/appframework/api/core_api.rst | 361 ------------------
.../appframework/api/db_doesnotexistexception.rst | 22 --
.../app/appframework/api/db_entity.rst | 97 -----
.../app/appframework/api/db_mapper.rst | 82 -----
.../api/db_multipleobjectsreturnedexception.rst | 22 --
.../api/dependencyinjection_dicontainer.rst | 24 --
.../app/appframework/api/http_dispatcher.rst | 30 --
.../app/appframework/api/http_downloadresponse.rst | 24 --
.../appframework/api/http_forbiddenresponse.rst | 20 -
.../app/appframework/api/http_http.rst | 36 --
.../app/appframework/api/http_jsonresponse.rst | 62 ----
.../app/appframework/api/http_notfoundresponse.rst | 20 -
.../app/appframework/api/http_redirectresponse.rst | 27 --
.../app/appframework/api/http_request.rst | 102 ------
.../app/appframework/api/http_response.rst | 85 -----
.../app/appframework/api/http_templateresponse.rst | 99 -----
.../appframework/api/http_textdownloadresponse.rst | 31 --
.../app/appframework/api/http_textresponse.rst | 30 --
.../app/appframework/api/http_twigresponse.rst | 33 --
developer_manual/app/appframework/api/index.rst | 106 ------
.../app/appframework/api/middleware_middleware.rst | 62 ----
.../api/middleware_middlewaredispatcher.rst | 81 -----
.../api/middleware_security_securityexception.rst | 28 --
.../api/middleware_security_securitymiddleware.rst | 44 ---
.../api/middleware_twig_twigmiddleware.rst | 45 ---
.../api/utility_controllertestutility.rst | 50 ---
.../appframework/api/utility_faviconfetcher.rst | 63 ----
.../appframework/api/utility_mappertestutility.rst | 45 ---
.../api/utility_methodannotationreader.rst | 29 --
.../api/utility_simplepieapifactory.rst | 37 --
.../app/appframework/api/utility_testutility.rst | 26 --
.../app/appframework/api/utility_timefactory.rst | 19 -
developer_manual/app/appframework/classloader.rst | 1 -
developer_manual/app/appframework/controllers.rst | 148 --------
developer_manual/app/appframework/css.rst | 1 -
.../app/appframework/data-migration.rst | 1 -
developer_manual/app/appframework/database.rst | 157 --------
developer_manual/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 -
developer_manual/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 -
developer_manual/app/appframework/templates.rst | 185 ----------
developer_manual/app/appframework/tutorial.rst | 181 ---------
developer_manual/app/appframework/unittesting.rst | 157 --------
developer_manual/app/backgroundjobs.rst | 4 +
developer_manual/app/classloader.rst | 5 +-
developer_manual/app/container.rst | 106 ++----
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, 139 insertions(+), 4482 deletions(-)
diff --git a/developer_manual/app/api.rst b/developer_manual/app/api.rst
new file mode 100644
index 0000000..942e609
--- /dev/null
+++ b/developer_manual/app/api.rst
@@ -0,0 +1,4 @@
+RESTful API
+===========
+
+.. sectionauthor:: Bernhard Posselt <dev at bernhard-posselt.com>
\ 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 679deac..0000000
--- 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 fad85d8..0000000
--- 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 e147e3d..0000000
--- a/developer_manual/app/app/api/ocs.rst
+++ /dev/null
@@ -1,21 +0,0 @@
-OCS
-===
-
-.. sectionauthor:: Tom Needham <tom at owncloud.com>
-
-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 <http://symfony.com/doc/2.0/book/routing.html>`_)
- :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 <http://symfony.com/doc/2.0/book/routing.html#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 02316ad..0000000
--- a/developer_manual/app/app/api/ocs_result.rst
+++ /dev/null
@@ -1,28 +0,0 @@
-OCS_Result
-==========
-
-.. sectionauthor:: Tom Needham <tom at owncloud.com>
-
-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 <totalitems> 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 <itemsperpage> 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 45233fb..0000000
--- a/developer_manual/app/app/api/templates.rst
+++ /dev/null
@@ -1,405 +0,0 @@
-OC Templates
-============
-.. sectionauthor:: Bernhard Posselt <nukeawhale at gmail.com>
-
-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
- $mainTemplate = new OC_Template('news', 'main', 'user');
- ?>
-
-
- .. 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 <head>
-
- **Example:**
-
- .. code-block:: php
-
- <?php
- $mainTemplate = new OC_Template('news', 'main', 'user');
- $mainTemplate->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
-
- <?php
- $customers = array("john", "frank");
-
- $mainTemplate = new OC_Template('news', 'main', 'user');
- $mainTemplate->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
-
- <?php
- $customers = array("john", "frank");
-
- $mainTemplate = new OC_Template('news', 'main', 'user');
- $mainTemplate->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
-
- <?php
- $mainTemplate = new OC_Template('news', 'main', 'user');
- $formFactor = $mainTemplate->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
-
- <?php
- $mainTemplate = new OC_Template('news', 'main', 'user');
- $formFactorExtension = $mainTemplate->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 <?php print_unescaped($this->inc('template')); ?> to do this. The included template has access to all parent template variables!
-
- **Example:**
-
- .. code-block:: php
-
- <div>
- <?php print_unescaped($this->inc('nav.inc', array('active' => 'nav_entry_1')); ?>
- </div>
-
-
- .. php:method:: printPage()
-
- :returns: true when there is content to print
-
- This function proceeds the template and prints its output.
-
- **Example:**
-
- .. code-block:: php
-
- <?php
- $mainTemplate = new OC_Template('news', 'main', 'user');
- $mainTemplate->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 <option> tags
-
-.. todo:: Fix parameters and add example
-
-
-
-human_file_size
-~~~~~~~~~~~~~~~
-.. php:function:: human_file_size($bytes)
-
- :param int $bytes: the bytes that we want to convert to a more readable format
- :returns: the human readable size as string
-
-Turns bytes into human readable formats, for instance 1024 bytes get turned into 1kb, 1024*1024 bytes get turned into 1mb
-
-.. code-block:: php
-
- <?php
- // this would print <li>2kB</li>
- ?>
- <li><?php p($this->human_file_size('2048')); ?></li>
-
-
-
-image_path
-~~~~~~~~~~
-.. php:function:: image_path($app, $image)
-
- :param string $app: the name of your app as a string. If the string is empty, ownCloud looks for the image in core
- :param array $image: the filename of the image
- :returns: the absolute URL to the image as a string
-
-This function looks up images in several common directories and returns the full link to it. The following directories are being searched:
-
-- /themes/$theme/apps/$app/img/$image
-- /themes/$theme/$app/img/$image
-- /$app/img/$image
-
-When you pass an empty string for $app, the following directories will be searched:
-
-- /themes/$theme/apps/$app/img/$image
-- /themes/$theme/core/img/$image
-- /core/img/$image
-
-**Example:**
-
-.. code-block:: php
-
- <img src="<?php print_unescaped(
- image_path('news', 'starred.svg');
- ); ?>" />
-
-
-
-
-link_to
-~~~~~~~
-.. php:function:: link_to($app, $file, [$args])
-
- :param string $app: the name of your app as a string. If the string is empty, ownCloud asumes that the file is in /core/
- :param string $file: the relative path from your apps root to the file you want to access
- :param array $args: the GET parameters that you want set in the URL in form key => value. The value will be run through urlencode()
- :returns: the absolute URL to the file
-
-This function is used to produce generate clean and absolute links to your files or pages.
-
-**Example:**
-
-.. code-block:: php
-
- <?php
- // this will produce the link:
- // index.php/news/pages/weather.php?show=berlin
- ?>
- <ul>
- <li><a href="<?php
- print_unescaped(
- link_to('news', 'pages/weather.php', array("show" => "berlin"));
- );
- ?>">Show Weather for Berlin</a></li>
- </ul>
-
-
-
-mimetype_icon
-~~~~~~~~~~~~~
-.. php:function:: mimetype_icon($mimetype)
-
- :param array $mimetype: the mimetype for which we want to look up the icon
- :returns: the absolute URL to the icon
-
-A shortcut for getting a mimetype icon.
-
-**Example:**
-
-.. code-block:: php
-
- <img src="<?php print_unescaped(
- mimetype_icon('application/xml');
- ); ?>" />
-
-
-
-p
-~
-.. php:function:: p($data)
-
- :param $data: the variable/array/object that should be printed
-
-.. versionadded:: 5.0
-
-This is the print statement which prints out XSS escaped values. ownCloud does not allow the direct usage of echo or print but enforces wrapper functions to prevent unwanted XSS vulnerabilities. If you want to print unescaped data, look at print_unescaped
-
-**Example:**
-
-.. code-block:: php
-
- <?php $names = array("John", "Jakob", "Tom"); ?>
- <div>
- <ul>
- <?php foreach($names as $name){ ?>
- <li><?php p($name); ?></li>
- <?php } ?>
- </ul>
- </div>
-
-
-
-print_unescaped
-~~~~~~~~~~~~~~~
-.. php:function:: print_unescaped($data)
-
- :param $data: the variable/array/object that should be printed
-
-.. versionadded:: 5.0
-
-This function does not escape the content for XSS. This would typically be used to print HTML or JavaScript that is generated by the server and **checked for XSS** vulnerabilities.
-
-
-**Example:**
-
-.. code-block:: php
-
- <?php $html = "<div>Some HTML</div>"; ?>
- <div>
- <?php print_unescaped($html); ?>
- </div>
-
-
-
-relative_modified_date
-~~~~~~~~~~~~~~~~~~~~~~
-.. php:function:: relative_modified_date($timestamp)
-
- :param int $timestamp: the timestamp from whom we compute the time span until now
- :returns: a relative date as string
-
-Instead of displaying a date, it is often better to give a relative date like: "2 days ago" or "3 hours ago". This function turns a timestamp into a relative date.
-
-.. code-block:: php
-
- <?php
- // this would print <span>5 minutes ago</span>
- ?>
- <span><?php p(relative_modified_date('29393992912')); ?></span>
-
-
-
-simple_file_size
-~~~~~~~~~~~~~~~~
-.. php:function:: simple_file_size($bytes)
-
- :param int $bytes: the bytes that we want to convert to a more readable format in megabytes
- :returns: the human readable size as string
-
-A more simpler function that only turns bytes into megabytes. If its smaller than 0.1 megabytes, < 0.1 is being returned. If its bigger than 1000 megabytes, > 1000 is being returned.
-
-.. code-block:: php
-
- <?php
- // this would print <li>< 0.1</li>
- ?>
- <li><?php p(simple_file_size('2048')); ?></li>
-
-
-
-Further reading
----------------
-- http://en.wikipedia.org/wiki/Cross-site_scripting
-- https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
-- https://www.owasp.org/index.php/Cross-site_Scripting_%28XSS%29
diff --git a/developer_manual/app/app/api/view.rst b/developer_manual/app/app/api/view.rst
deleted file mode 100644
index 88369f8..0000000
--- a/developer_manual/app/app/api/view.rst
+++ /dev/null
@@ -1,362 +0,0 @@
-View
-====
-
-
-
-
-
-.. php:namespace:: OC\Files
-.. php:class:: View
-
-
-
-
- .. php:method:: __construct($root)
-
- :param mixed $root:
-
-
-
- .. php:method:: getAbsolutePath($path='/')
-
- :param mixed $path:
-
-
-
- .. php:method:: chroot($fakeRoot)
-
- :param string $fakeRoot:
- :returns bool:
-
-
- change the root to a fake root
-
-
- .. php:method:: getRoot()
-
- :returns string:
-
-
- get the fake root
-
-
- .. php:method:: getRelativePath($path)
-
- :param string $path:
- :returns string:
-
-
- get path relative to the root of the view
-
-
- .. php:method:: getMountPoint($path)
-
- :param string $path:
- :returns string:
-
-
- get the mountpoint of the storage object for a path( note: because a storage is not always mounted inside the fakeroot, thereturned mountpoint is relative to the absolute root of the filesystemand doesn't take the chroot into account )
-
-
- .. php:method:: resolvePath($path)
-
- :param string $path:
- :returns array: consisting of the storage and the internal path
-
-
- resolve a path to a storage and internal path
-
-
- .. php:method:: getLocalFile($path)
-
- :param string $path:
- :returns string:
-
-
- return the path to a local version of the filewe need this because we can't know if a file is stored local or not fromoutside the filestorage and for some purposes a local file is needed
-
-
- .. php:method:: getLocalFolder($path)
-
- :param string $path:
- :returns string:
-
-
-
- .. php:method:: mkdir($path)
-
- :param mixed $path:
-
-
- the following functions operate with arguments and return values identicalto those of their PHP built-in equivalents.
- Mostly they are merely wrappersfor \OC\Files\Storage\Storage via basicOperation().
-
-
- .. php:method:: rmdir($path)
-
- :param mixed $path:
-
-
-
- .. php:method:: opendir($path)
-
- :param mixed $path:
-
-
-
- .. php:method:: readdir($handle)
-
- :param mixed $handle:
-
-
-
- .. php:method:: is_dir($path)
-
- :param mixed $path:
-
-
-
- .. php:method:: is_file($path)
-
- :param mixed $path:
-
-
-
- .. php:method:: stat($path)
-
- :param mixed $path:
-
-
-
- .. php:method:: filetype($path)
-
- :param mixed $path:
-
-
-
- .. php:method:: filesize($path)
-
- :param mixed $path:
-
-
-
- .. php:method:: readfile($path)
-
- :param mixed $path:
-
-
-
- .. php:method:: isCreatable($path)
-
- :param mixed $path:
-
-
-
- .. php:method:: isReadable($path)
-
- :param mixed $path:
-
-
-
- .. php:method:: isUpdatable($path)
-
- :param mixed $path:
-
-
-
- .. php:method:: isDeletable($path)
-
- :param mixed $path:
-
-
-
- .. php:method:: isSharable($path)
-
- :param mixed $path:
-
-
-
- .. php:method:: file_exists($path)
-
- :param mixed $path:
-
-
-
- .. php:method:: filemtime($path)
-
- :param mixed $path:
-
-
-
- .. php:method:: touch($path, $mtime=null)
-
- :param mixed $path:
- :param mixed $mtime:
-
-
-
- .. php:method:: file_get_contents($path)
-
- :param mixed $path:
-
-
-
- .. php:method:: file_put_contents($path, $data)
-
- :param mixed $path:
- :param mixed $data:
-
-
-
- .. php:method:: unlink($path)
-
- :param mixed $path:
-
-
-
- .. php:method:: deleteAll($directory, $empty=false)
-
- :param mixed $directory:
- :param mixed $empty:
-
-
-
- .. php:method:: rename($path1, $path2)
-
- :param mixed $path1:
- :param mixed $path2:
-
-
-
- .. php:method:: copy($path1, $path2)
-
- :param mixed $path1:
- :param mixed $path2:
-
-
-
- .. php:method:: fopen($path, $mode)
-
- :param mixed $path:
- :param mixed $mode:
-
-
-
- .. php:method:: toTmpFile($path)
-
- :param mixed $path:
-
-
-
- .. php:method:: fromTmpFile($tmpFile, $path)
-
- :param mixed $tmpFile:
- :param mixed $path:
-
-
-
- .. php:method:: getMimeType($path)
-
- :param mixed $path:
-
-
-
- .. php:method:: hash($type, $path, $raw=false)
-
- :param mixed $type:
- :param mixed $path:
- :param mixed $raw:
-
-
-
- .. php:method:: free_space($path='/')
-
- :param mixed $path:
-
-
-
- .. php:method:: hasUpdated($path, $time)
-
- :param string $path:
- :param int $time:
- :returns bool:
-
-
- check if a file or folder has been updated since $time
-
-
- .. php:method:: getFileInfo($path)
-
- :param string $path:
- :returns array: returns an associative array with the following keys:- size- mtime- mimetype- encrypted- versioned
-
-
- get the filesystem info
-
-
- .. php:method:: getDirectoryContent($directory, $mimetype_filter='')
-
- :param string $directory: path under datadirectory
- :param mixed $mimetype_filter:
- :returns array:
-
-
- get the content of a directory
-
-
- .. php:method:: putFileInfo($path, $data)
-
- :param string $path:
- :param array $data:
- :returns int: returns the fileid of the updated file
-
-
- change file metadata
-
-
- .. php:method:: search($query)
-
- :param string $query:
- :returns array:
-
-
- search for files with the name matching $query
-
-
- .. php:method:: searchByMime($mimetype)
-
- :param mixed $mimetype:
- :returns array:
-
-
- search for files by mimetype
-
-
- .. php:method:: getOwner($path)
-
- :param string $path:
- :returns string:
-
-
- Get the owner for a file or folder
-
-
- .. php:method:: getETag($path)
-
- :param string $path:
- :returns string:
-
-
- get the ETag for a file or folder
-
-
- .. php:method:: getPath($id)
-
- :param int $id:
- :returns string:
-
-
- Get the path of a file by id, relative to the view
- Note that the resulting path is not guarantied to be unique for the id, multiple paths can point to the same file
-
-
diff --git a/developer_manual/app/app/css.rst b/developer_manual/app/app/css.rst
deleted file mode 100644
index 09790bb..0000000
--- a/developer_manual/app/app/css.rst
+++ /dev/null
@@ -1,47 +0,0 @@
-CSS
-===
-
-.. sectionauthor:: Bernhard Posselt <nukeawhale at gmail.com>
-
-Stylesheets have to be included in your templates, see :doc:`static`
-
-If you have to include an image or css file in your CSS, prepend the following to your path:
-
-* **%appswebroot%**: gets the absolute path to your app
-* **%webroot%**: gets the absolute path to owncloud
-
-For example:
-
-.. code-block:: css
-
- .folder > .title {
- background-image: url('%webroot%/core/img/places/folder.svg');
- }
-
-CSS for apps
-------------
-ownCloud comes with special CSS rules for apps to make app development easier.
-
-.. todo:: document this
-
-Formfactors
------------
-ownCloud automatically detects what kind of form factor you are using.
-
-Currently supported are:
-
-* **mobile**: works well on mobiles
-* **tablet**: optimized for devices like iPads or Android Tablets
-* **standalone**: mode where only the content of an App is shown. The header, footer and side navigation is not visible. This is useful if ownCloud is embedded in other applications.
-
-The auto detection can be overwritten by using the “formfactor” GET variable in the url::
-
- index.php/myapp?formfactor=mobile
-
-If you want to provide a different stylesheet or javascript file for mobile devices just suffix the formfactor in the filename, like::
-
- style.mobile.css
-
-or::
-
- script.tablet.css
diff --git a/developer_manual/app/app/data-migration.rst b/developer_manual/app/app/data-migration.rst
deleted file mode 100644
index 3714cfd..0000000
--- a/developer_manual/app/app/data-migration.rst
+++ /dev/null
@@ -1,126 +0,0 @@
-Data Migration
-==============
-As of OC4, user migration is supported. To include migration support in your app (which is highly recommended and does not take long) you must provide a :file:`appinfo/migrate.php`. The function of the migrate.php file is to provide an import and export functions for app data. To assist in this, we set the user id of the user being exported / user being imported in **$this->uid**. There is also an instance of the **OC_Migration_Content** class stored in **$this->content**. The **OC_Migra [...]
-
-Export
-------
-In this function, you must do everything necessary to export a user from the current ownCloud instance, given a user id. For most apps this is just the case of saving a few rows from the database.
-
-Database Data
-~~~~~~~~~~~~~
-
-To make exporting database data really easy, the class **OC_Migration_Content** has a method called **copyRows()** which will save these rows for you given some options. Take a look at the export function for the bookmarks app:
-
-.. code-block:: php
-
- <?php
-
- function export( ){
- OC_Log::write('migration','starting export for bookmarks',OC_Log::INFO);
-
- // migrate two tables
- $bookmarkOptions = array(
- 'table'=>'bookmarks',
- 'matchcol'=>'user_id',
- 'matchval'=>$this->uid,
- 'idcol'=>'id'
- );
- $bookmarkIds = $this->content->copyRows( $bookmarkOptions );
-
- $bookmarkTagsOptions = array(
- 'table'=>'bookmarks_tags',
- 'matchcol'=>'bookmark_id',
- 'matchval'=>$ids
- );
- $bookmarkTagsIds = $this->content->copyRows( $bookmarkTagsOptions );
-
- // If both returned some ids then they worked
- if( is_array( $bookmarkIds ) && is_array( $bookmarkTagsIds ) )
- {
- return true;
- } else {
- return false;
- }
- }
-
-The bookmarks app stores all of its data in the database, in two tables: \*PREFIX*bookmarks and \*PREFIX*bookmarks_tags so to export this, we need to run **copyRows()** twice. Here is an explanation of the options passed to it:
-
-* **table**: string name of the table to export (without any prefix)
-* **matchcol**: (optional) string name of the column that will be matched with the value in **matchval** (Basically the column used in the WHERE sql query)
-* **matchval**: (optional) the value that will be searched for in the table
-* **idcol**: the name of the column that will be returned
-
-To export the bookmarks, **matchcol** is set to the user_id column and **matchval** is set to the user being exported: **$this->content->uid**. **idcol** is set to the id of the bookmark, as we need to retrive the tags associated with the bookmarks for the user being exported. The function will return an array of ids.Next we run the **copyRows()** method again, this time on the bookmarks_tags table, matching a range of values (as we want to find all tags, related to all bookmarks owned b [...]
-
-Files
-~~~~~
-
-If you use files to hold some app data in **data/userid/appname/**, they will be automatically copied exported for you.
-
-Import
-------
-
-Import is a little more tricky as we have to take into account data from different versions of your app, and also handle changing primary keys. Here is the import function for the bookmarks app which imports bookmarks and tags:
-
-.. code-block:: php
-
- <?php
-
- function import(){
- switch( $this->appinfo->version ){
- default:
- // All versions of the app have had the same db structure
- // so all can use the same import function
- $query = $this->content->prepare( "SELECT * FROM bookmarks WHERE user_id LIKE ?" );
- $results = $query->execute( array( $this->olduid ));
- $idmap = array();
- while( $row = $results->fetchRow() ){
- // Import each bookmark, saving its id into the map
- $sql = "INSERT INTO *PREFIX*bookmarks" .
- "(url, title, user_id, public, added, lastmodified)" .
- " VALUES (?, ?, ?, ?, ?, ?)";
- $query = OC_DB::prepare($sql);
- $query->execute( array(
- $row['url'],
- $row['title'],
- $this->uid,
- $row['public'],
- $row['added'],
- $row['lastmodified']
- ) );
- // Map the id
- $idmap[$row['id']] = OC_DB::insertid();
- }
- // Now tags
- foreach($idmap as $oldid => $newid){
- $sql = "SELECT * FROM bookmarks_tags WHERE user_id LIKE ?";
- $query = $this->content->prepare($sql);
- $results = $query->execute( array( $oldid ) );
- while( $row = $data->fetchRow() ){
- // Import the tags for this bookmark, using the new bookmark id
- $sql = "INSERT INTO *PREFIX*bookmarks_tags(bookmark_id, tag)".
- " VALUES (?, ?)";
- $query = OC_DB::prepare($sql);
- $query->execute( array( $newid, $row['tag'] ) );
- }
- }
- // All done!
- break;
- }
- return true;
- }
-
-We start off by using a switch to run different import code for different versions of your app. **$this->appinfo->version** contains the version string from the :file:`appinfo/info.xml` of your app. In the case of the bookmarks app the db structure has not changed, so only one version of import code is needed.
-
-To import the db data, first we must retrive it from the **migration.db**. To do this we use the prepare method from **OC_Migration_Content**, which returns a MDB2 db object. We then cycle through the bookmarks in migration.db and insert them into the owncloud database. The important bit is the **idmapping**. After inserting a boookmark, The new id of the bookmark is saved in an array, with the key being the old id of the bookmark. This means when inserting the tags, we know what the new [...]
-
-Remember this part of the import code may be a good place to emit some hooks depending on your app. For example the contacts app could emit some hooks to show some contacts have been added.
-
-After importing the bookmarks, we must import the tags. It is a very similar process to importing the bookmarks, except we have to take into account the changes in primary keys. This is done by using a foreach key in the **$idmap** array, and then inserting the tags using the new id.
-
-After all this, we must return a boolean value to indicate the success or failure of the import. Again, app data files stored in **data/userid/appname/** will be automatically copied over before the apps import function is executed, this allows you to manipulate the imported files if necessary.
-
-Conclusion
-----------
-
-To fully support user migration for your app you must provide an import and export function under an instance of **OC_Migration_Provider** and put this code in the file :file:`appinfo/migrate.php`
diff --git a/developer_manual/app/app/database.rst b/developer_manual/app/app/database.rst
deleted file mode 100644
index b0057b0..0000000
--- a/developer_manual/app/app/database.rst
+++ /dev/null
@@ -1,46 +0,0 @@
-Database Access
-===============
-
-.. sectionauthor:: Bernhard Posselt <nukeawhale at gmail.com>
-
-After the schema has been defined it is possible to query the database. ownCloud uses prepared statements. A simple query would look like this:
-
-.. code-block:: php
-
- <?php
-
- // *PREFIX* is being replaced with the ownCloud installation prefix
- $sql = 'SELECT * FROM `*PREFIX*myusers` WHERE id = ?';
- $args = array(1);
-
- $query = \OCP\DB::prepare($sql);
- $result = $query->execute($args);
-
- while($row = $result->fetchRow()) {
- $userName = $row['username'];
- }
-
-If a new element is saved to the database the inserted id can be accessed by using:
-
-.. code-block:: php
-
- <?php
-
- $id = \OCP\DB::insertid();
-
-
-It is also possible to use transactions:
-
-.. code-block:: php
-
- <?php
-
- \OCP\DB::beginTransaction();
-
- $sql = 'SELECT * FROM `*PREFIX*myusers` WHERE id = ?';
- $args = array(1);
-
- $query = \OCP\DB::prepare($sql);
- $result = $query->execute($args);
-
- \OCP\DB::commit();
diff --git a/developer_manual/app/app/externalapi.rst b/developer_manual/app/app/externalapi.rst
deleted file mode 100644
index 04c05ca..0000000
--- a/developer_manual/app/app/externalapi.rst
+++ /dev/null
@@ -1,95 +0,0 @@
-External API
-============
-
-.. sectionauthor:: Tom Needham <tom at owncloud.com>
-
-Introduction
-------------
-The external API inside ownCloud allows third party developers to access data
-provided by ownCloud apps. ownCloud version 5.0 will follow the `OCS v1.7
-specification <http://www.freedesktop.org/wiki/Specifications/open-collaboration-services-1.7>`_ (draft).
-
-Usage
------
-
-Registering Methods
-~~~~~~~~~~~~~~~~~~~
-Methods are registered inside the :file:`appinfo/routes.php` using :php:class:`OCP\\API`
-
-.. code-block:: php
-
- <?php
-
- \OCP\API::register(
- 'get',
- '/apps/yourapp/url',
- function($urlParameters) {
- return new \OC_OCS_Result($data);
- },
- 'yourapp',
- \OC_API::ADMIN_AUTH
- );
-
-Returning Data
-~~~~~~~~~~~~~~
-Once the API backend has matched your URL, your callable function as defined in
-**$action** will be executed. This method is passed as array of parameters that you defined in **$url**. To return data back the the client, you should return an instance of :php:class:`OC_OCS_Result`. The API backend will then use this to construct the XML or JSON response.
-
-Authentication & Basics
-~~~~~~~~~~~~~~~~~~~~~~~
-Because REST is stateless you have to send user and password each time you access the API. Therefore running ownCloud **with SSL is highly recommended** otherwise **everyone in your network can log your credentials**::
-
- https://user:password@yourowncloud.com/ocs/v1.php/apps/yourapp
-
-
-Output
-~~~~~~
-The output defaults to XML. If you want to get JSON append this to the URL::
-
- ?format=json
-
-Output from the application is wrapped inside a **data** element:
-
-**XML**:
-
-.. code-block:: xml
-
- <?xml version="1.0"?>
- <ocs>
- <meta>
- <status>ok</status>
- <statuscode>100</statuscode>
- <message/>
- </meta>
- <data>
- <!-- data here -->
- </data>
- </ocs>
-
-
-**JSON**:
-
-.. code-block:: js
-
- {
- "ocs": {
- "meta": {
- "status": "ok",
- "statuscode": 100,
- "message": null
- },
- "data": {
- // data here
- }
- }
- }
-
-Statuscodes
-~~~~~~~~~~~
-The statuscode can be any of the following numbers:
-
-* **100** - successfull
-* **996** - server error
-* **997** - not authorized
-* **998** - not found
-* **999** - unknown error
\ No newline at end of file
diff --git a/developer_manual/app/app/filesystem.rst b/developer_manual/app/app/filesystem.rst
deleted file mode 100644
index 5169cb0..0000000
--- a/developer_manual/app/app/filesystem.rst
+++ /dev/null
@@ -1,7 +0,0 @@
-Filesystem
-==========
-ownCloud handling of filesystems is very flexible. A variety of local and remote filesystem types are supported, as well as a variety of hooks and optional features such as encryption and version control. It is important that apps use the correct methods for interacting with files in order to maintain this flexibility.
-
-In some cases using PHP’s internal filesystem functions directly will be sufficient, such as **unlink()** and **mkdir()**. Most of the time however it is necessary to use one of ownCloud’s filesystem classes. This documentation assumes that you are working with files stored within a user’s directory (as opposed to ownCloud core files), and therefore need to use :php:class:`OC\\Files\\View`.
-
-.. todo:: write the rest
diff --git a/developer_manual/app/app/index.rst b/developer_manual/app/app/index.rst
deleted file mode 100644
index f2d2ae2..0000000
--- a/developer_manual/app/app/index.rst
+++ /dev/null
@@ -1,21 +0,0 @@
-===================================
-App Development (ownCloud App API)
-===================================
-
-.. toctree::
- :maxdepth: 1
-
- tutorial
- info
- classloader
- routes
- schema
- database
- templates
- static
- css
- externalapi
- filesystem
- hooks
- data-migration
- api/index
diff --git a/developer_manual/app/app/routes.rst b/developer_manual/app/app/routes.rst
deleted file mode 100644
index fdb598e..0000000
--- a/developer_manual/app/app/routes.rst
+++ /dev/null
@@ -1,66 +0,0 @@
-Routes
-======
-
-.. sectionauthor:: Bernhard Posselt <nukeawhale at gmail.com>
-
-PHP usually treats the URL like a filepath. This is easy for beginners but gets more complicated if a good architecture is required. For instance if an URL should call a certain function/method or if values should be extracted from the URL.
-
-Routing connects your URLs with your controller methods and allows you to create constant and nice URLs. Its also easy to extract values from the URLs.
-
-ownCloud uses `Symphony Routing <http://symfony.com/doc/2.0/book/routing.html>`_
-
-Routes are declared in :file:`appinfo/routes.php`
-
-A simple route would look like this:
-
-.. code-block:: php
-
- <?php
-
- // this route matches /index.php/yourapp/myurl/SOMEVALUE
- $this->create('yourappname_routename', '/myurl/{key}')->action(
- function($params){
- require __DIR__ . '/../index.php';
- }
- );
-
-
-The first argument is the name of your route. This is used as an identifier to get the URL of the route and is a nice way to generate the URL in your templates or JavaScript for certain links since it does not force you to hardcode your URLs.
-
-.. note:: The identifier should always start with the appid since they are global and you could overwrite a route of a different app
-
-The second parameter is the URL which should be matched. You can extract values from the URL by using **{key}** in the section that you want to get. That value is then available under **$params['key']**, for the above example it would be **$params['key']**. You can omit the parameter if you dont extract any values from the URL at all.
-
-If a default value should be used for an URL parameter, it can be set via the **defaults** method:
-
-.. code-block:: php
-
- <?php
-
- $this->create('yourappname_routename', '/myurl/{key}')->action(
- function($params){
- require __DIR__ . '/../index.php';
- }
- )->defaults('key' => 'john');
-
-The **action** method allows you to register a callback which gets called if the route is matched. You can use this to call a controller or simply include a PHP file.
-
-Using routes in templates and JavaScript
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-To use routes in :php:class:`OC_Template`, use:
-
-.. code-block:: php
-
- <?
- print_unescaped(\OCP\Util::linkToRoute( 'yourappname_routename', array('key' => 1)));
-
-
-In JavaScript you can get the URL for a route like this:
-
-.. code-block:: javascript
-
- var params = {key: 1};
- var url = OC.Router.generate('yourappname_routename', params);
- console.log(url); // prints /index.php//yourappname/myurl/1
-
-.. note:: Be sure to only use the routes generator after the routes are loaded. This can be done by registering a callback with **OC.Router.registerLoadedCallback(callback)**
\ No newline at end of file
diff --git a/developer_manual/app/app/static.rst b/developer_manual/app/app/static.rst
deleted file mode 100644
index acbe4ed..0000000
--- a/developer_manual/app/app/static.rst
+++ /dev/null
@@ -1,18 +0,0 @@
-Static content
-==============
-
-.. sectionauthor:: Bernhard Posselt <nukeawhale at gmail.com>
-
-Static content consists of:
-
-* **img/**: all images
-* **js/**: all JavaScript files
-* **css/**: all CSS files
-
-Because ownCloud templates do not support template inheritance it is not possible to add your own script tags. Therefore ownCloud provides the methods **\\OCP\Util::addScript('your_app_id', 'script')** and **\\OCP\Util::addStyle('your_app_id', 'style')**. The first parameter is the app's id, the second one is the path relative to the **js/** respectively the **css/** folder without the file extension.
-
-If you use Twig Templates, there is the **script** and **style** function, see :doc:`../appframework/templates`.
-
-
-CSS and JavaScript are compressed by ownCloud so if the CSS or JavaScript do not seem to get updated, check if the debug mode is enabled. To enable it see :ref:`debugmode`
-
diff --git a/developer_manual/app/app/tutorial.rst b/developer_manual/app/app/tutorial.rst
deleted file mode 100644
index ca0ae4a..0000000
--- a/developer_manual/app/app/tutorial.rst
+++ /dev/null
@@ -1,86 +0,0 @@
-App Tutorial
-============
-
-.. sectionauthor:: Bernhard Posselt <nukeawhale at gmail.com>
-
-This tutorial contains the traditional approach to write an app and continues where :doc:`../intro/createapp` left off. The result will be a simple "Hello World" app.
-
-Navigation entry
-----------------
-This file will always loaded for every app and can for instance be used to load additional JavaScript for the files app. Therefore the navigation entry has to be registered in this file.
-
-:file:`appinfo/app.php`:
-
-.. code-block:: php
-
- <?php
-
- \OCP\App::addNavigationEntry(array(
-
- // the string under which your app will be referenced in owncloud
- 'id' => 'myapp',
-
- // sorting weight for the navigation. The higher the number, the higher
- // will it be listed in the navigation
- 'order' => 74,
-
- // the route that will be shown on startup
- 'href' => \OCP\Util::linkToRoute('myapp_index'),
-
- // the icon that will be shown in the navigation
- // this file needs to exist in img/example.png
- 'icon' => \OCP\Util::imagePath('myapp', 'nav-icon.png'),
-
- // the title of your application. This will be used in the
- // navigation or on the settings page of your app
- 'name' => 'My App'
- ));
-
-Create the main route
----------------------
-:doc:`routes` map the URL to functions and allow to extract values. To show the content when the navigation entry is clicked, the index route which was defined in the :file:`appinfo/app.php` needs to be created:
-
-:file:`appinfo/routes.php`:
-
-.. code-block:: php
-
- <?php
-
- $this->create('myapp_index', '/')->action(
- function($params){
- require __DIR__ . '/../index.php';
- }
- );
-
-
-Write the logic
----------------
-In this example the logic is written procedurally in a PHP file. This file contains database queries and security checks and prints the final template:
-
-:file:`index.php`:
-
-.. code-block:: php
-
- <?php
-
- // Look up other security checks in the docs!
- \OCP\User::checkLoggedIn();
- \OCP\App::checkAppEnabled('myapp');
-
- $tpl = new OCP\Template("myapp", "main", "user");
- $tpl->assign('msg', 'Hello World');
- $tpl->printPage();
-
-
-Create the template
--------------------
-The last thing that needs to be done is to create the :doc:`templates` file which was used in the :file:`index.php`.
-
-:file:`templates/main.php`:
-
-.. code-block:: php
-
- <p><?php p($_['msg']); ?></p>
-
-
-Congratulations! The message "Hello World" can now be seen on the main page of your app.
\ No newline at end of file
diff --git a/developer_manual/app/appframework/api/app.rst b/developer_manual/app/appframework/api/app.rst
deleted file mode 100644
index f7fa8ca..0000000
--- a/developer_manual/app/appframework/api/app.rst
+++ /dev/null
@@ -1,27 +0,0 @@
-App
-===
-
-
-Entry point for every request in your app.
-You can consider this as your
-public static void main() method
-
-Handles all the dependency injection, controllers and output flow
-
-.. php:namespace:: OCA\AppFramework
-.. php:class:: App
-
-
-
-
- .. php:staticmethod:: App::main($controllerName, $methodName, $urlParams, $container)
-
- :param string $controllerName: the name of the controller under which it is stored in the DI container
- :param string $methodName: the method that you want to call
- :param array $urlParams: an array with variables extracted from the routes
- :param \\Pimple $container: an instance of a pimple container.
-
-
- Shortcut for calling a controller method and printing the result
-
-
diff --git a/developer_manual/app/appframework/api/controller_controller.rst b/developer_manual/app/appframework/api/controller_controller.rst
deleted file mode 100644
index 1c07fd7..0000000
--- a/developer_manual/app/appframework/api/controller_controller.rst
+++ /dev/null
@@ -1,118 +0,0 @@
-Controller
-==========
-
-
-Baseclass to inherit your controllers from
-
-
-.. php:namespace:: OCA\AppFramework\Controller
-.. php:class:: Controller
-
- * **Abstract**
-
-
- .. php:attr:: $api
-
- * **Protected**
-
- None
-
- .. php:attr:: $request
-
- * **Protected**
-
-
-
-
-
- .. php:method:: __construct($api, $request)
-
- :param \\OCA\\AppFramework\\Core\\API $api: an api wrapper instance
- :param \\OCA\\AppFramework\\Http\\Request $request: an instance of the request
-
-
-
- .. php:method:: params($key, $default=null)
-
- :param string $key: the key which you want to access in the URL Parameter placeholder, $_POST or $_GET array. The priority how they're returned is the following: 1. URL parameters 2. POST parameters 3. GET parameters
- :param mixed $default: If the key is not found, this value will be returned
- :returns mixed: the content of the array
-
-
- Lets you access post and get parameters by the index
-
-
- .. php:method:: getParams()
-
- :returns array: the array with all parameters
-
-
- Returns all params that were received, be it from the request(as GET or POST) or throuh the URL by the route
-
-
- .. php:method:: method()
-
- :returns string: the method of the request (POST, GET, etc)
-
-
- Returns the method of the request
-
-
- .. php:method:: getUploadedFile($key)
-
- :param string $key: the key that will be taken from the $_FILES array
- :returns array: the file in the $_FILES element
-
-
- Shortcut for accessing an uploaded file through the $_FILES array
-
-
- .. php:method:: env($key)
-
- :param string $key: the key that will be taken from the $_ENV array
- :returns array: the value in the $_ENV element
-
-
- Shortcut for getting env variables
-
-
- .. php:method:: session($key)
-
- :param string $key: the key that will be taken from the $_SESSION array
- :returns array: the value in the $_SESSION element
-
-
- Shortcut for getting session variables
-
-
- .. php:method:: cookie($key)
-
- :param string $key: the key that will be taken from the $_COOKIE array
- :returns array: the value in the $_COOKIE element
-
-
- Shortcut for getting cookie variables
-
-
- .. php:method:: render($templateName, $params=array(), $renderAs='user', $headers=array())
-
- :param string $templateName: the name of the template
- :param array $params: the template parameters in key => value structure
- :param string $renderAs: user renders a full page, blank only your template admin an entry in the admin settings
- :param array $headers: set additional headers in name/value pairs
- :returns \\OCA\\AppFramework\\Http\\TemplateResponse: containing the page
-
-
- Shortcut for rendering a template
-
-
- .. php:method:: renderJSON($data=array(), $errorMsg=null)
-
- :param array $data: the PHP array that will be put into the JSON data indexempty by default
- :param string $errorMsg: If you want to return an error message, pass one
- :returns \\OCA\\AppFramework\\Http\\JSONResponse: containing the values
-
-
- Shortcut for rendering a JSON response
-
-
diff --git a/developer_manual/app/appframework/api/core_api.rst b/developer_manual/app/appframework/api/core_api.rst
deleted file mode 100644
index 45b3e8f..0000000
--- a/developer_manual/app/appframework/api/core_api.rst
+++ /dev/null
@@ -1,361 +0,0 @@
-API
-===
-
-
-This is used to wrap the owncloud static api calls into an object to make the
-code better abstractable for use in the dependency injection container
-Should you find yourself in need for more methods, simply inherit from this
-class and add your methods
-
-.. php:namespace:: OCA\AppFramework\Core
-.. php:class:: API
-
-
-
-
- .. php:method:: __construct($appName)
-
- :param string $appName: the name of your application
-
-
- constructor
-
-
- .. php:method:: getAppName()
-
- :returns string: the name of your application
-
-
- used to return the appname of the set application
-
-
- .. php:method:: addNavigationEntry($entry)
-
- :param array $entry: containing: id, name, order, icon and href key
-
-
- Creates a new navigation entry
-
-
- .. php:method:: getUserId()
-
- :returns string: the user id of the current user
-
-
- Gets the userid of the current user
-
-
- .. php:method:: activateNavigationEntry()
-
-
-
- Sets the current navigation entry to the currently running app
-
-
- .. php:method:: addScript($scriptName, $appName=null)
-
- :param string $scriptName: the name of the javascript in js/ without the suffix
- :param string $appName: the name of the app, defaults to the current one
-
-
- Adds a new javascript file
-
-
- .. php:method:: addStyle($styleName, $appName=null)
-
- :param string $styleName: the name of the css file in css/without the suffix
- :param string $appName: the name of the app, defaults to the current one
-
-
- Adds a new css file
-
-
- .. php:method:: add3rdPartyScript($name)
-
- :param string $name: the name of the file without the suffix
-
-
- shorthand for addScript for files in the 3rdparty directory
-
-
- .. php:method:: add3rdPartyStyle($name)
-
- :param string $name: the name of the file without the suffix
-
-
- shorthand for addStyle for files in the 3rdparty directory
-
-
- .. php:method:: getSystemValue($key)
-
- :param string $key: the key of the value, under which it was saved
- :returns string: the saved value
-
-
- Looks up a systemwide defined value
-
-
- .. php:method:: setSystemValue($key, $value)
-
- :param string $key: the key of the value, under which will be saved
- :param string $value: the value that should be stored
-
-
- Sets a new systemwide value
-
-
- .. php:method:: getAppValue($key, $appName=null)
-
- :param string $key: the key of the value, under which it was saved
- :param mixed $appName:
- :returns string: the saved value
-
-
- Looks up an appwide defined value
-
-
- .. php:method:: setAppValue($key, $value, $appName=null)
-
- :param string $key: the key of the value, under which will be saved
- :param string $value: the value that should be stored
- :param mixed $appName:
-
-
- Writes a new appwide value
-
-
- .. php:method:: setUserValue($key, $value, $userId=null)
-
- :param string $key: the key under which the value is being stored
- :param string $value: the value that you want to store
- :param string $userId: the userId of the user that we want to store the value under, defaults to the current one
-
-
- Shortcut for setting a user defined value
-
-
- .. php:method:: getUserValue($key, $userId=null)
-
- :param string $key: the key under which the value is being stored
- :param string $userId: the userId of the user that we want to store the value under, defaults to the current one
-
-
- Shortcut for getting a user defined value
-
-
- .. php:method:: getTrans()
-
- :returns \\OC_L10N: the translation object
-
-
- Returns the translation object
-
-
- .. php:method:: prepareQuery($sql, $limit=null, $offset=null)
-
- :param string $sql: the sql query with ? placeholder for params
- :param int $limit: the maximum number of rows
- :param int $offset: from which row we want to start
- :returns \\OCP\\DB: a query object
-
-
- Used to abstract the owncloud database access away
-
-
- .. php:method:: getInsertId($tableName)
-
- :param string $tableName: the name of the table where we inserted the item
- :returns int: the id of the inserted element
-
-
- Used to get the id of the just inserted element
-
-
- .. php:method:: linkToRoute($routeName, $arguments=array())
-
- :param string $routeName: the name of the route
- :param array $arguments: an array with arguments which will be filled into the url
- :returns string: the url
-
-
- Returns the URL for a route
-
-
- .. php:method:: linkTo($file, $appName=null)
-
- :param string $file: the name of the file
- :param string $appName: the name of the app, defaults to the current one
-
-
- Returns an URL for an image or file
-
-
- .. php:method:: imagePath($file, $appName=null)
-
- :param string $file: the name of the file
- :param string $appName: the name of the app, defaults to the current one
-
-
- Returns the link to an image, like link to but only with prepending img/
-
-
- .. php:method:: getAbsoluteURL($url)
-
- :param string $url: the url
- :returns string: the absolute url
-
-
- Makes an URL absolute
-
-
- .. php:method:: linkToAbsolute($file, $appName=null)
-
- :param string $file: the name of the file
- :param string $appName: the name of the app, defaults to the current one
- :returns string: the url
-
-
- .. warning:: **DEPRECATED**: replaced with linkToRoute()
-
- links to a file
-
-
- .. php:method:: isLoggedIn()
-
- :returns bool: true if logged in
-
-
- Checks if the current user is logged in
-
-
- .. php:method:: isAdminUser($userId)
-
- :param string $userId: the id of the user
- :returns bool: true if admin
-
-
- Checks if a user is an admin
-
-
- .. php:method:: isSubAdminUser($userId)
-
- :param string $userId: the id of the user
- :returns bool: true if subadmin
-
-
- Checks if a user is an subadmin
-
-
- .. php:method:: passesCSRFCheck()
-
- :returns bool: true if CSRF check passed
-
-
- Checks if the CSRF check was correct
-
-
- .. php:method:: isAppEnabled($appName)
-
- :param string $appName: the name of an app
- :returns bool: true if app is enabled
-
-
- Checks if an app is enabled
-
-
- .. php:method:: log($msg, $level=null)
-
- :param string $msg: the error message to be logged
- :param int $level: the error level
-
-
- Writes a function into the error log
-
-
- .. php:method:: getTemplate($templateName, $renderAs='user', $appName=null)
-
- :param string $templateName: the name of the template
- :param string $renderAs: how it should be rendered
- :param string $appName: the name of the app
- :returns \\OCP\\Template: a new template
-
-
- Returns a template
-
-
- .. php:method:: getLocalFilePath($path)
-
- :param string $path: path the path to the file on the oc filesystem
- :returns string: the filepath in the filesystem
-
-
- turns an owncloud path into a path on the filesystem
-
-
- .. php:method:: openEventSource()
-
- :returns \\OC_EventSource: a new open EventSource class
-
-
- used to return and open a new eventsource
-
-
- .. php:method:: connectHook($signalClass, $signalName, $slotClass, $slotName)
-
- :param string $signalClass: class name of emitter
- :param string $signalName: name of signal
- :param string $slotClass: class name of slot
- :param string $slotName: name of slot, in another word, this is the name of the method that will be called when registered signal is emitted.
- :returns \\OCA\\AppFramework\\Core\\bool,: always true
-
-
- connects a function to a hook
-
-
- .. php:method:: emitHook($signalClass, $signalName, $params=array())
-
- :param string $signalClass: class name of emitter
- :param string $signalName: name of signal
- :param array $params: defautl: array() array with additional data
- :returns \\OCA\\AppFramework\\Core\\bool,: true if slots exists or false if not
-
-
- Emits a signal. To get data from the slot use references!
-
-
- .. php:method:: clearHook($signalClass=false, $signalName=false)
-
- :param string $signalClass:
- :param string $signalName:
-
-
- clear hooks
-
-
- .. php:method:: getUrlContent($url)
-
- :param string $url: the url that should be fetched
- :returns string: the content of the webpage
-
-
- Gets the content of an URL by using CURL or a fallback if it is notinstalled
-
-
- .. php:method:: addRegularTask($className, $methodName)
-
- :param string $className: full namespace and class name of the class
- :param string $methodName: the name of the static method that should becalled
-
-
- Register a backgroundjob task
-
-
- .. php:method:: registerAdmin($mainPath, $appName=null)
-
- :param string $mainPath: the path to the main php file without the phpsuffix, relative to your apps directory! not the template directory
- :param string $appName: the name of the app, defaults to the current one
-
-
- Tells ownCloud to include a template in the admin overview
-
-
diff --git a/developer_manual/app/appframework/api/db_doesnotexistexception.rst b/developer_manual/app/appframework/api/db_doesnotexistexception.rst
deleted file mode 100644
index 4b12303..0000000
--- a/developer_manual/app/appframework/api/db_doesnotexistexception.rst
+++ /dev/null
@@ -1,22 +0,0 @@
-DoesNotExistException
-=====================
-
-
-This is returned or should be returned when a find request does not find an
-entry in the database
-
-
-.. php:namespace:: OCA\AppFramework\Db
-.. php:class:: DoesNotExistException
-
-
-
-
- .. php:method:: __construct($msg)
-
- :param string $msg: the error message
-
-
- Constructor
-
-
diff --git a/developer_manual/app/appframework/api/db_entity.rst b/developer_manual/app/appframework/api/db_entity.rst
deleted file mode 100644
index e3e335f..0000000
--- a/developer_manual/app/appframework/api/db_entity.rst
+++ /dev/null
@@ -1,97 +0,0 @@
-Entity
-======
-
-
-
-
-
-.. php:namespace:: OCA\AppFramework\Db
-.. php:class:: Entity
-
- * **Abstract**
-
-
- .. php:attr:: $id
-
-
-
-
-
- .. php:staticmethod:: Entity::fromParams($params)
-
- :param array $params: the array which was obtained via $this->params('key')in the controller
- :returns \\OCA\\AppFramework\\Db\\Entity:
-
-
- Simple alternative constructor for building entities from a request
-
-
- .. php:method:: fromRow($row)
-
- :param array $row: the row to map onto the entity
-
-
- Maps the keys of the row array to the attributes
-
-
- .. php:method:: resetUpdatedFields()
-
-
-
- Marks the entity as clean needed for setting the id after the insertion
-
-
- .. php:method:: __call($methodName, $args)
-
- :param mixed $methodName:
- :param mixed $args:
-
-
- Each time a setter is called, push the part after setinto an array: for instance setId will save Id in theupdated fields array so it can be easily used to create thegetter method
-
-
- .. php:method:: markFieldUpdated($attribute)
-
- :param string $attribute: the name of the attribute
-
- * **Protected**
-
-
- Mark am attribute as updated
-
-
- .. php:method:: columnToProperty($columnName)
-
- :param string $columnName: the name of the column
- :returns string: the property name
-
-
- Transform a database columnname to a property
-
-
- .. php:method:: propertyToColumn($property)
-
- :param string $property: the name of the property
- :returns string: the column name
-
-
- Transform a property to a database column name
-
-
- .. php:method:: getUpdatedFields()
-
- :returns array: array of updated fields for update query
-
-
-
- .. php:method:: addType($fieldName, $type)
-
- :param string $fieldName: the name of the attribute
- :param string $type: the type which will be used to call settype()
-
- * **Protected**
-
-
- Adds type information for a field so that its automatically casted tothat value once its being returned from the database
-
-
diff --git a/developer_manual/app/appframework/api/db_mapper.rst b/developer_manual/app/appframework/api/db_mapper.rst
deleted file mode 100644
index 8899a55..0000000
--- a/developer_manual/app/appframework/api/db_mapper.rst
+++ /dev/null
@@ -1,82 +0,0 @@
-Mapper
-======
-
-
-Simple parent class for inheriting your data access layer from.
-This class
-may be subject to change in the future
-
-.. php:namespace:: OCA\AppFramework\Db
-.. php:class:: Mapper
-
- * **Abstract**
-
-
-
-
- .. php:method:: __construct($api, $tableName)
-
- :param \\OCA\\AppFramework\\Core\\API $api: Instance of the API abstraction layer
- :param string $tableName: the name of the table. set this to allow entity queries without using sql
-
-
-
- .. php:method:: getTableName()
-
- :returns string: the table name
-
-
-
- .. php:method:: delete($entity)
-
- :param \\OCA\\AppFramework\\Db\\Entity $entity:
-
-
- Deletes an entity from the table
-
-
- .. php:method:: insert($entity)
-
- :param \\OCA\\AppFramework\\Db\\Entity $entity:
- :returns \\OCA\\AppFramework\\Db\\the: saved entity with the set id
-
-
- Creates a new entry in the db from an entity
-
-
- .. php:method:: update($entity)
-
- :param \\OCA\\AppFramework\\Db\\Entity $entity:
- :throws \\InvalidArgumentException: if entity has no id
-
-
- Updates an entry in the db from an entity
-
-
- .. php:method:: findOneQuery($sql, $params)
-
- :param string $sql: the sql query
- :param array $params: the parameters of the sql query
- :throws \\OCA\\AppFramework\\Db\\DoesNotExistException: if the item does not exist
- :returns array: the result as row
-
- * **Protected**
-
-
- Returns an db result and throws exceptions when there are more or lessresults
-
-
- .. php:method:: execute($sql, $params=array(), $limit=null, $offset=null)
-
- :param string $sql: the prepare string
- :param array $params: the params which should replace the ? in the sql query
- :param int $limit: the maximum number of rows
- :param int $offset: from which row we want to start
- :returns \\PDOStatement: the database query result
-
- * **Protected**
-
-
- Runs an sql query
-
-
diff --git a/developer_manual/app/appframework/api/db_multipleobjectsreturnedexception.rst b/developer_manual/app/appframework/api/db_multipleobjectsreturnedexception.rst
deleted file mode 100644
index 6dc65af..0000000
--- a/developer_manual/app/appframework/api/db_multipleobjectsreturnedexception.rst
+++ /dev/null
@@ -1,22 +0,0 @@
-MultipleObjectsReturnedException
-================================
-
-
-This is returned or should be returned when a find request finds more than one
-row
-
-
-.. php:namespace:: OCA\AppFramework\Db
-.. php:class:: MultipleObjectsReturnedException
-
-
-
-
- .. php:method:: __construct($msg)
-
- :param string $msg: the error message
-
-
- Constructor
-
-
diff --git a/developer_manual/app/appframework/api/dependencyinjection_dicontainer.rst b/developer_manual/app/appframework/api/dependencyinjection_dicontainer.rst
deleted file mode 100644
index 500d1b3..0000000
--- a/developer_manual/app/appframework/api/dependencyinjection_dicontainer.rst
+++ /dev/null
@@ -1,24 +0,0 @@
-DIContainer
-===========
-
-
-This class extends Pimple (http://pimple.sensiolabs.org/) for reusability
-To use this class, extend your own container from this.
-Should you require it
-you can overwrite the dependencies with your own classes by simply redefining
-a dependency
-
-.. php:namespace:: OCA\AppFramework\DependencyInjection
-.. php:class:: DIContainer
-
-
-
-
- .. php:method:: __construct($appName)
-
- :param string $appName: the name of the app
-
-
- Put your class dependencies in here
-
-
diff --git a/developer_manual/app/appframework/api/http_dispatcher.rst b/developer_manual/app/appframework/api/http_dispatcher.rst
deleted file mode 100644
index 45951fe..0000000
--- a/developer_manual/app/appframework/api/http_dispatcher.rst
+++ /dev/null
@@ -1,30 +0,0 @@
-Dispatcher
-==========
-
-
-Class to dispatch the request to the middleware disptacher
-
-
-.. php:namespace:: OCA\AppFramework\Http
-.. php:class:: Dispatcher
-
-
-
-
- .. php:method:: __construct($protocol, $middlewareDispatcher)
-
- :param \\OCA\\AppFramework\\Http\\Http $protocol: the http protocol with contains all status headers
- :param \\OCA\\AppFramework\\Middleware\\MiddlewareDispatcher $middlewareDispatcher: the dispatcher which runs the middleware
-
-
-
- .. php:method:: dispatch($controller, $methodName)
-
- :param \\OCA\\AppFramework\\Controller\\Controller $controller: the controller which will be called
- :param string $methodName: the method name which will be called onthe controller
- :returns array: $array[0] contains a string with the http main header,$array[1] contains headers in the form: $key => value, $array[2] containsthe response output
-
-
- Handles a request and calls the dispatcher on the controller
-
-
diff --git a/developer_manual/app/appframework/api/http_downloadresponse.rst b/developer_manual/app/appframework/api/http_downloadresponse.rst
deleted file mode 100644
index 5a11de1..0000000
--- a/developer_manual/app/appframework/api/http_downloadresponse.rst
+++ /dev/null
@@ -1,24 +0,0 @@
-DownloadResponse
-================
-
-
-Prompts the user to download the a file
-
-
-.. php:namespace:: OCA\AppFramework\Http
-.. php:class:: DownloadResponse
-
- * **Abstract**
-
-
-
-
- .. php:method:: __construct($filename, $contentType)
-
- :param string $filename: the name that the downloaded file should have
- :param string $contentType: the mimetype that the downloaded file should have
-
-
- Creates a response that prompts the user to download the file
-
-
diff --git a/developer_manual/app/appframework/api/http_forbiddenresponse.rst b/developer_manual/app/appframework/api/http_forbiddenresponse.rst
deleted file mode 100644
index 240dc23..0000000
--- a/developer_manual/app/appframework/api/http_forbiddenresponse.rst
+++ /dev/null
@@ -1,20 +0,0 @@
-ForbiddenResponse
-=================
-
-
-Pure hader response, Just return 403 status to the browser
-
-
-.. php:namespace:: OCA\AppFramework\Http
-.. php:class:: ForbiddenResponse
-
-
-
-
- .. php:method:: __construct()
-
-
-
- Creates a response that just returns 403 status
-
-
diff --git a/developer_manual/app/appframework/api/http_http.rst b/developer_manual/app/appframework/api/http_http.rst
deleted file mode 100644
index 8fcfa2a..0000000
--- a/developer_manual/app/appframework/api/http_http.rst
+++ /dev/null
@@ -1,36 +0,0 @@
-Http
-====
-
-
-
-
-
-.. php:namespace:: OCA\AppFramework\Http
-.. php:class:: Http
-
-
- .. php:attr:: $headers
-
- * **Protected**
-
-
-
-
-
- .. php:method:: __construct($server, $protocolVersion='HTTP/1.1')
-
- :param mixed $server:
- :param string $protocolVersion: the http version to use defaults to HTTP/1.1
-
-
-
- .. php:method:: getStatusHeader($status, $lastModified=null, $ETag=null)
-
- :param \\OCA\\AppFramework\\Http\\Http::CONSTANT $status: the constant from the Http class
- :param \\DateTime $lastModified: formatted last modified date
- :param mixed $ETag:
-
-
- Gets the correct header
-
-
diff --git a/developer_manual/app/appframework/api/http_jsonresponse.rst b/developer_manual/app/appframework/api/http_jsonresponse.rst
deleted file mode 100644
index 4dc0f9c..0000000
--- a/developer_manual/app/appframework/api/http_jsonresponse.rst
+++ /dev/null
@@ -1,62 +0,0 @@
-JSONResponse
-============
-
-
-A renderer for JSON calls
-
-
-.. php:namespace:: OCA\AppFramework\Http
-.. php:class:: JSONResponse
-
-
- .. php:attr:: $error
-
- * **Protected**
-
-
-
- .. php:attr:: $data
-
- * **Protected**
-
-
-
-
-
- .. php:method:: __construct()
-
-
-
-
- .. php:method:: setParams($params)
-
- :param array $params: an array with key => value structure which will be transformed to JSON
-
-
- Sets values in the data json array
-
-
- .. php:method:: getParams()
-
- :returns array: the params
-
-
- Used to get the set parameters
-
-
- .. php:method:: setErrorMessage($msg)
-
- :param mixed $msg:
-
-
- in case we want to render an error message, also logs into the owncloud log
-
-
- .. php:method:: render()
-
- :returns string: the rendered json
-
-
- Returns the rendered json
-
-
diff --git a/developer_manual/app/appframework/api/http_notfoundresponse.rst b/developer_manual/app/appframework/api/http_notfoundresponse.rst
deleted file mode 100644
index d9c9feb..0000000
--- a/developer_manual/app/appframework/api/http_notfoundresponse.rst
+++ /dev/null
@@ -1,20 +0,0 @@
-NotFoundResponse
-================
-
-
-Pure hader response, Just return 404 status to the browser
-
-
-.. php:namespace:: OCA\AppFramework\Http
-.. php:class:: NotFoundResponse
-
-
-
-
- .. php:method:: __construct()
-
-
-
- Creates a response that just returns 404 status
-
-
diff --git a/developer_manual/app/appframework/api/http_redirectresponse.rst b/developer_manual/app/appframework/api/http_redirectresponse.rst
deleted file mode 100644
index aef1196..0000000
--- a/developer_manual/app/appframework/api/http_redirectresponse.rst
+++ /dev/null
@@ -1,27 +0,0 @@
-RedirectResponse
-================
-
-
-Redirects to a different URL
-
-
-.. php:namespace:: OCA\AppFramework\Http
-.. php:class:: RedirectResponse
-
-
-
-
- .. php:method:: __construct($redirectURL)
-
- :param string $redirectURL: the url to redirect to
-
-
- Creates a response that redirects to a url
-
-
- .. php:method:: getRedirectURL()
-
- :returns string: the url to redirect
-
-
-
diff --git a/developer_manual/app/appframework/api/http_request.rst b/developer_manual/app/appframework/api/http_request.rst
deleted file mode 100644
index 676cb47..0000000
--- a/developer_manual/app/appframework/api/http_request.rst
+++ /dev/null
@@ -1,102 +0,0 @@
-Request
-=======
-
-
-Class for accessing variables in the request.
-This class provides an immutable object with request variables.
-
-.. php:namespace:: OCA\AppFramework\Http
-.. php:class:: Request
-
-
- .. php:attr:: $items
-
- * **Protected**
-
-
-
- .. php:attr:: $allowedKeys
-
- * **Protected**
-
-
-
-
-
- .. php:method:: __construct($vars=array())
-
- :param array $vars: An associative array with the following optional values:
-
-
- .. note:: \OCA\AppFramework\Http\http://www.php.net/manual/en/reserved.variables.php
-
-
- .. php:method:: count()
-
-
-
-
- .. php:method:: offsetExists($offset)
-
- :param string $offset: offset The key to lookup
- :returns string|null:
-
-
- ArrayAccess methods
- Gives access to the combined GET, POST and urlParams arraysExamples:$var = $request['myvar'];orif(!isset($request['myvar']) { // Do something}$request['myvar'] = 'something'; // This throws an exception.
-
-
- .. php:method:: offsetGet($offset)
-
- :param mixed $offset:
-
-
- .. note:: \OCA\AppFramework\Http\offsetExists
-
-
- .. php:method:: offsetSet($offset, $value)
-
- :param mixed $offset:
- :param mixed $value:
-
-
- .. note:: \OCA\AppFramework\Http\offsetExists
-
-
- .. php:method:: offsetUnset($offset)
-
- :param mixed $offset:
-
-
- .. note:: \OCA\AppFramework\Http\offsetExists
-
-
- .. php:method:: __set($name, $value)
-
- :param mixed $name:
- :param mixed $value:
-
-
-
- .. php:method:: __get($name)
-
- :param string $name: The key to look for.
- :returns mixed|null:
-
-
- Access request variables by method and name.
- Examples:$request->post['myvar']; // Only look for POST variables$request->myvar; or $request->{'myvar'}; or $request->{$myvar}Looks in the combined GET, POST and urlParams array.if($request->method !== 'POST') { throw new Exception('This function can only be invoked using POST');}
-
-
- .. php:method:: __isset($name)
-
- :param mixed $name:
-
-
-
- .. php:method:: __unset($id)
-
- :param mixed $id:
-
-
-
diff --git a/developer_manual/app/appframework/api/http_response.rst b/developer_manual/app/appframework/api/http_response.rst
deleted file mode 100644
index 22846ef..0000000
--- a/developer_manual/app/appframework/api/http_response.rst
+++ /dev/null
@@ -1,85 +0,0 @@
-Response
-========
-
-
-Baseclass for responses.
-Also used to just send headers
-
-.. php:namespace:: OCA\AppFramework\Http
-.. php:class:: Response
-
-
-
-
- .. php:method:: cacheFor($cacheSeconds)
-
- :param int $cacheSeconds: the amount of seconds that should be cachedif 0 then caching will be disabled
-
-
- Caches the response
-
-
- .. php:method:: addHeader($name, $value)
-
- :param string $name: The name of the HTTP header
- :param string $value: The value, null will delete it
-
-
- Adds a new header to the response that will be called before the renderfunction
-
-
- .. php:method:: getHeaders()
-
- :returns array: the headers
-
-
- Returns the set headers
-
-
- .. php:method:: render()
-
- :returns null:
-
-
- By default renders no output
-
-
- .. php:method:: setStatus($status)
-
- :param int $status: a HTTP status code, see also the STATUS constants
-
-
- Set response status
-
-
- .. php:method:: getStatus()
-
-
-
- Get response status
-
-
- .. php:method:: getETag()
-
- :returns string: the etag
-
-
-
- .. php:method:: getLastModified()
-
- :returns string: RFC2822 formatted last modified date
-
-
-
- .. php:method:: setETag($ETag)
-
- :param string $ETag:
-
-
-
- .. php:method:: setLastModified($lastModified)
-
- :param \\DateTime $lastModified:
-
-
-
diff --git a/developer_manual/app/appframework/api/http_templateresponse.rst b/developer_manual/app/appframework/api/http_templateresponse.rst
deleted file mode 100644
index 1961243..0000000
--- a/developer_manual/app/appframework/api/http_templateresponse.rst
+++ /dev/null
@@ -1,99 +0,0 @@
-TemplateResponse
-================
-
-
-Response for a normal template
-
-
-.. php:namespace:: OCA\AppFramework\Http
-.. php:class:: TemplateResponse
-
-
- .. php:attr:: $templateName
-
- * **Protected**
-
-
-
- .. php:attr:: $params
-
- * **Protected**
-
-
-
- .. php:attr:: $api
-
- * **Protected**
-
-
-
- .. php:attr:: $renderAs
-
- * **Protected**
-
-
-
- .. php:attr:: $appName
-
- * **Protected**
-
-
-
-
-
- .. php:method:: __construct($api, $templateName, $appName=null)
-
- :param \\OCA\\AppFramework\\Core\\API $api: an API instance
- :param string $templateName: the name of the template
- :param string $appName: optional if you want to include a template from a different app
-
-
-
- .. php:method:: setParams($params)
-
- :param array $params: an array with key => value structure which sets template variables
-
-
- Sets template parameters
-
-
- .. php:method:: getParams()
-
- :returns array: the params
-
-
- Used for accessing the set parameters
-
-
- .. php:method:: getTemplateName()
-
- :returns string: the name of the used template
-
-
- Used for accessing the name of the set template
-
-
- .. php:method:: renderAs($renderAs)
-
- :param string $renderAs: admin, user or blank. Admin also prints the admin settings header and footer, user renders the normal normal page including footer and header and blank just renders the plain template
-
-
- Sets the template page
-
-
- .. php:method:: getRenderAs()
-
- :returns string: the renderAs value
-
-
- Returns the set renderAs
-
-
- .. php:method:: render()
-
- :returns string: the rendered html
-
-
- Returns the rendered html
-
-
diff --git a/developer_manual/app/appframework/api/http_textdownloadresponse.rst b/developer_manual/app/appframework/api/http_textdownloadresponse.rst
deleted file mode 100644
index 1caaaae..0000000
--- a/developer_manual/app/appframework/api/http_textdownloadresponse.rst
+++ /dev/null
@@ -1,31 +0,0 @@
-TextDownloadResponse
-====================
-
-
-Prompts the user to download the a textfile
-
-
-.. php:namespace:: OCA\AppFramework\Http
-.. php:class:: TextDownloadResponse
-
-
-
-
- .. php:method:: __construct($content, $filename, $contentType)
-
- :param string $content: the content that should be written into the file
- :param string $filename: the name that the downloaded file should have
- :param string $contentType: the mimetype that the downloaded file should have
-
-
- Creates a response that prompts the user to download a file whichcontains the passed string
-
-
- .. php:method:: render()
-
- :returns string: the file contents
-
-
- Simply sets the headers and returns the file contents
-
-
diff --git a/developer_manual/app/appframework/api/http_textresponse.rst b/developer_manual/app/appframework/api/http_textresponse.rst
deleted file mode 100644
index 0521494..0000000
--- a/developer_manual/app/appframework/api/http_textresponse.rst
+++ /dev/null
@@ -1,30 +0,0 @@
-TextResponse
-============
-
-
-Just outputs text to the browser
-
-
-.. php:namespace:: OCA\AppFramework\Http
-.. php:class:: TextResponse
-
-
-
-
- .. php:method:: __construct($content, $contentType='plain')
-
- :param string $content: the content that should be written into the file
- :param string $contentType: the mimetype. text/ is added automatically soonly plain or html can be added to get text/plain or text/html
-
-
- Creates a response that just outputs text
-
-
- .. php:method:: render()
-
- :returns string: the file contents
-
-
- Simply sets the headers and returns the file contents
-
-
diff --git a/developer_manual/app/appframework/api/http_twigresponse.rst b/developer_manual/app/appframework/api/http_twigresponse.rst
deleted file mode 100644
index a7283a7..0000000
--- a/developer_manual/app/appframework/api/http_twigresponse.rst
+++ /dev/null
@@ -1,33 +0,0 @@
-TwigResponse
-============
-
-
-Response for twig templates.
-Do not use this directly to render your
-templates, unless you want a blank page because the owncloud header and
-footer won't be included
-
-.. php:namespace:: OCA\AppFramework\Http
-.. php:class:: TwigResponse
-
-
-
-
- .. php:method:: __construct($api, $templateName, $twig)
-
- :param \\OCA\\AppFramework\\Core\\API $api: an api instance
- :param string $templateName: the name of the twig template
- :param \\OCA\\AppFramework\\Http\\Twig_Environment $twig: an instance of the twig environment for rendering
-
-
- Instantiates the Twig Template
-
-
- .. php:method:: render()
-
- :returns string: rendered output
-
-
- Returns the rendered result
-
-
diff --git a/developer_manual/app/appframework/api/index.rst b/developer_manual/app/appframework/api/index.rst
deleted file mode 100644
index 5286d0b..0000000
--- a/developer_manual/app/appframework/api/index.rst
+++ /dev/null
@@ -1,106 +0,0 @@
-================
-AppFramework API
-================
-
-.. toctree::
- :maxdepth: 1
- :hidden:
-
- app
- controller_controller
- core_api
- db_doesnotexistexception
- db_multipleobjectsreturnedexception
- db_mapper
- db_entity
- dependencyinjection_dicontainer
- http_dispatcher
- http_http
- http_response
- http_downloadresponse
- http_jsonresponse
- http_redirectresponse
- http_templateresponse
- http_textresponse
- http_textdownloadresponse
- http_twigresponse
- http_request
- http_notfoundresponse
- http_forbiddenresponse
- middleware_middleware
- middleware_middlewaredispatcher
- middleware_security_securitymiddleware
- middleware_security_securityexception
- middleware_twig_twigmiddleware
- utility_controllertestutility
- utility_mappertestutility
- utility_testutility
- utility_methodannotationreader
- utility_faviconfetcher
- utility_simplepieapifactory
- utility_timefactory
-
-
-
-Main
-----
-* :doc:`app`
-* :doc:`dependencyinjection_dicontainer`
-
-API Layer
----------
-* :doc:`core_api`
-
-Request
--------
-* :doc:`http_dispatcher`
-* :doc:`http_http`
-* :doc:`http_request`
-
-Controllers
------------
-* :doc:`controller_controller`
-
-Database
---------
-* :doc:`db_doesnotexistexception`
-* :doc:`db_multipleobjectsreturnedexception`
-* :doc:`db_mapper`
-
-Responses
----------
-* :doc:`http_response`
-* :doc:`http_downloadresponse`
-* :doc:`http_jsonresponse`
-* :doc:`http_redirectresponse`
-* :doc:`http_templateresponse`
-* :doc:`http_textresponse`
-* :doc:`http_textdownloadresponse`
-
-Middleware
-----------
-* :doc:`middleware_middleware`
-* :doc:`middleware_middlewaredispatcher`
-
-Security & Authentication
-^^^^^^^^^^^^^^^^^^^^^^^^^
-* :doc:`middleware_security_securitymiddleware`
-* :doc:`utility_methodannotationreader`
-* :doc:`middleware_security_securityexception`
-
-Twig Templates
-^^^^^^^^^^^^^^
-* :doc:`middleware_twig_twigmiddleware`
-* :doc:`http_twigresponse`
-
-Utilities
----------
-* :doc:`utility_faviconfetcher`
-* :doc:`utility_simplepieapifactory`
-* :doc:`utility_timefactory`
-
-Testing
--------
-* :doc:`utility_controllertestutility`
-* :doc:`utility_mappertestutility`
-* :doc:`utility_testutility`
\ No newline at end of file
diff --git a/developer_manual/app/appframework/api/middleware_middleware.rst b/developer_manual/app/appframework/api/middleware_middleware.rst
deleted file mode 100644
index bed7f78..0000000
--- a/developer_manual/app/appframework/api/middleware_middleware.rst
+++ /dev/null
@@ -1,62 +0,0 @@
-Middleware
-==========
-
-
-Middleware is used to provide hooks before or after controller methods and
-deal with possible exceptions raised in the controller methods.
-They're modeled after Django's middleware system:
-https://docs.djangoproject.com/en/dev/topics/http/middleware/
-
-.. php:namespace:: OCA\AppFramework\Middleware
-.. php:class:: Middleware
-
- * **Abstract**
-
-
-
-
- .. php:method:: beforeController($controller, $methodName)
-
- :param \\OCA\\AppFramework\\Middleware\\Controller $controller: the controller that is being called
- :param string $methodName: the name of the method that will be called on the controller
-
-
- This is being run in normal order before the controller is beingcalled which allows several modifications and checks
-
-
- .. php:method:: afterException($controller, $methodName, $exception)
-
- :param \\OCA\\AppFramework\\Middleware\\Controller $controller: the controller that is being called
- :param string $methodName: the name of the method that will be called on the controller
- :param \\Exception $exception: the thrown exception
- :returns \\OCA\\AppFramework\\Http\\Response: a Response object or null in case that the exception could not be handled
-
-
- This is being run when either the beforeController method or thecontroller method itself is throwing an exception.
- The middleware isasked in reverse order to handle the exception and to return a response.If the response is null, it is assumed that the exception could not behandled and the error will be thrown again
-
-
- .. php:method:: afterController($controller, $methodName, $response)
-
- :param \\OCA\\AppFramework\\Middleware\\Controller $controller: the controller that is being called
- :param string $methodName: the name of the method that will be called on the controller
- :param \\OCA\\AppFramework\\Http\\Response $response: the generated response from the controller
- :returns \\OCA\\AppFramework\\Http\\Response: a Response object
-
-
- This is being run after a successful controllermethod call and allowsthe manipulation of a Response object.
- The middleware is run in reverse order
-
-
- .. php:method:: beforeOutput($controller, $methodName, $output)
-
- :param \\OCA\\AppFramework\\Middleware\\Controller $controller: the controller that is being called
- :param string $methodName: the name of the method that will be called on the controller
- :param string $output: the generated output from a response
- :returns string: the output that should be printed
-
-
- This is being run after the response object has been rendered andallows the manipulation of the output.
- The middleware is run in reverse order
-
-
diff --git a/developer_manual/app/appframework/api/middleware_middlewaredispatcher.rst b/developer_manual/app/appframework/api/middleware_middlewaredispatcher.rst
deleted file mode 100644
index 4a859bd..0000000
--- a/developer_manual/app/appframework/api/middleware_middlewaredispatcher.rst
+++ /dev/null
@@ -1,81 +0,0 @@
-MiddlewareDispatcher
-====================
-
-
-This class is used to store and run all the middleware in correct order
-
-
-.. php:namespace:: OCA\AppFramework\Middleware
-.. php:class:: MiddlewareDispatcher
-
-
-
-
- .. php:method:: __construct()
-
-
-
- Constructor
-
-
- .. php:method:: registerMiddleware($middleware)
-
- :param \\OCA\\AppFramework\\Middleware\\Middleware $middleware: the middleware which will be added
-
-
- Adds a new middleware
-
-
- .. php:method:: getMiddlewares()
-
- :returns array: the middlewares
-
-
- returns an array with all middleware elements
-
-
- .. php:method:: beforeController($controller, $methodName)
-
- :param \\OCA\\AppFramework\\Controller\\Controller $controller: the controller that is being called
- :param string $methodName: the name of the method that will be called on the controller
-
-
- This is being run in normal order before the controller is beingcalled which allows several modifications and checks
-
-
- .. php:method:: afterException($controller, $methodName, $exception)
-
- :param \\OCA\\AppFramework\\Controller\\Controller $controller: the controller that is being called
- :param string $methodName: the name of the method that will be called on the controller
- :param \\Exception $exception: the thrown exception
- :returns \\OCA\\AppFramework\\Http\\Response: a Response object or null in case that the exception could not behandled
-
-
- This is being run when either the beforeController method or thecontroller method itself is throwing an exception.
- The middleware is askedin reverse order to handle the exception and to return a response.If the response is null, it is assumed that the exception could not behandled and the error will be thrown again
-
-
- .. php:method:: afterController($controller, $methodName, $response)
-
- :param \\OCA\\AppFramework\\Controller\\Controller $controller: the controller that is being called
- :param string $methodName: the name of the method that will be called on the controller
- :param \\OCA\\AppFramework\\Http\\Response $response: the generated response from the controller
- :returns \\OCA\\AppFramework\\Http\\Response: a Response object
-
-
- This is being run after a successful controllermethod call and allowsthe manipulation of a Response object.
- The middleware is run in reverse order
-
-
- .. php:method:: beforeOutput($controller, $methodName, $output)
-
- :param \\OCA\\AppFramework\\Controller\\Controller $controller: the controller that is being called
- :param string $methodName: the name of the method that will be called on the controller
- :param string $output: the generated output from a response
- :returns string: the output that should be printed
-
-
- This is being run after the response object has been rendered andallows the manipulation of the output.
- The middleware is run in reverse order
-
-
diff --git a/developer_manual/app/appframework/api/middleware_security_securityexception.rst b/developer_manual/app/appframework/api/middleware_security_securityexception.rst
deleted file mode 100644
index 33b97b0..0000000
--- a/developer_manual/app/appframework/api/middleware_security_securityexception.rst
+++ /dev/null
@@ -1,28 +0,0 @@
-SecurityException
-=================
-
-
-Thrown when the security middleware encounters a security problem
-
-
-.. php:namespace:: OCA\AppFramework\Middleware\Security
-.. php:class:: SecurityException
-
-
-
-
- .. php:method:: __construct($msg, $ajax)
-
- :param string $msg: the security error message
- :param bool $ajax: true if it resulted because of an ajax request
-
-
-
- .. php:method:: isAjax()
-
- :returns bool: true if exception resulted because of an ajax request
-
-
- Used to check if a security exception occured in an ajax request
-
-
diff --git a/developer_manual/app/appframework/api/middleware_security_securitymiddleware.rst b/developer_manual/app/appframework/api/middleware_security_securitymiddleware.rst
deleted file mode 100644
index ffb8ddc..0000000
--- a/developer_manual/app/appframework/api/middleware_security_securitymiddleware.rst
+++ /dev/null
@@ -1,44 +0,0 @@
-SecurityMiddleware
-==================
-
-
-Used to do all the authentication and checking stuff for a controller method
-It reads out the annotations of a controller method and checks which if
-security things should be checked and also handles errors in case a security
-check fails
-
-
-.. php:namespace:: OCA\AppFramework\Middleware\Security
-.. php:class:: SecurityMiddleware
-
-
-
-
- .. php:method:: __construct($api)
-
- :param \\OCA\\AppFramework\\Core\\API $api: an instance of the api
-
-
-
- .. php:method:: beforeController($controller, $methodName)
-
- :param \\OCA\\AppFramework\\Middleware\\Security\\string/Controller $controller: the controllername or string
- :param string $methodName: the name of the method
- :throws \\OCA\\AppFramework\\Middleware\\Security\\SecurityException: when a security check fails
-
-
- This runs all the security checks before a method call.
- Thesecurity checks are determined by inspecting the controller methodannotations
-
-
- .. php:method:: afterException($controller, $methodName, $exception)
-
- :param \\OCA\\AppFramework\\Controller\\Controller $controller: the controller that is being called
- :param string $methodName: the name of the method that will be called on the controller
- :param \\Exception $exception: the thrown exception
- :returns \\OCA\\AppFramework\\Http\\Response: a Response object or null in case that the exception could not be handled
-
-
- If an SecurityException is being caught, ajax requests return a JSON errorresponse and non ajax requests redirect to the index
-
-
diff --git a/developer_manual/app/appframework/api/middleware_twig_twigmiddleware.rst b/developer_manual/app/appframework/api/middleware_twig_twigmiddleware.rst
deleted file mode 100644
index 51debeb..0000000
--- a/developer_manual/app/appframework/api/middleware_twig_twigmiddleware.rst
+++ /dev/null
@@ -1,45 +0,0 @@
-TwigMiddleware
-==============
-
-
-This template is used to add the possibility to add twig templates
-By default it is only loaded when the templatepath is set
-
-
-.. php:namespace:: OCA\AppFramework\Middleware\Twig
-.. php:class:: TwigMiddleware
-
-
-
-
- .. php:method:: __construct($api, $twig)
-
- :param \\OCA\\AppFramework\\Core\\API $api: an instance of the api
- :param \\OCA\\AppFramework\\Middleware\\Twig\\Twig_Environment $twig: an instance of the twig environment
-
-
- Sets the twig loader instance
-
-
- .. php:method:: afterController($controller, $methodName, $response)
-
- :param \\OCA\\AppFramework\\Controller\\Controller $controller: the controller that is being called
- :param string $methodName: the name of the method that will be called on the controller
- :param \\OCA\\AppFramework\\Http\\Response $response: the generated response from the controller
- :returns \\OCA\\AppFramework\\Http\\Response: a Response object
-
-
- Swaps the template response with the twig response and stores if atemplate needs to be printed for the user or admin page
-
-
- .. php:method:: beforeOutput($controller, $methodName, $output)
-
- :param \\OCA\\AppFramework\\Controller\\Controller $controller: the controller that is being called
- :param string $methodName: the name of the method that will be called on the controller
- :param string $output: the generated output from a response
- :returns string: the output that should be printed
-
-
- In case the output is not rendered as blank page, we need to include theowncloud header and output
-
-
diff --git a/developer_manual/app/appframework/api/utility_controllertestutility.rst b/developer_manual/app/appframework/api/utility_controllertestutility.rst
deleted file mode 100644
index 05a2fde..0000000
--- a/developer_manual/app/appframework/api/utility_controllertestutility.rst
+++ /dev/null
@@ -1,50 +0,0 @@
-ControllerTestUtility
-=====================
-
-
-Simple utility class for testing controllers
-
-
-.. php:namespace:: OCA\AppFramework\Utility
-.. php:class:: ControllerTestUtility
-
- * **Abstract**
-
-
-
-
- .. php:method:: assertAnnotations($controller, $method, $expected, $valid=array())
-
- :param \\OCA\\AppFramework\\Utility\\Controller/string $controller: name or instance of the controller
- :param mixed $method:
- :param array $expected: an array containing the expected annotations
- :param array $valid: if you define your own annotations, pass them here
-
- * **Protected**
-
-
- Checks if a controllermethod has the expected annotations
-
-
- .. php:method:: assertHeaders($expected=array(), $response)
-
- :param array $expected: an array with the expected headers
- :param \\OCA\\AppFramework\\Http\\Response $response: the response which we want to test for headers
-
- * **Protected**
-
-
- Shortcut for testing expected headers of a response
-
-
- .. php:method:: getRequest($params)
-
- :param array $params: a hashmap with the parameters for request
- :returns \\OCA\\AppFramework\\Http\\Request: a request instance
-
- * **Protected**
-
-
- Instead of using positional parameters this function instantiatesa request by using a hashmap so its easier to only set specific params
-
-
diff --git a/developer_manual/app/appframework/api/utility_faviconfetcher.rst b/developer_manual/app/appframework/api/utility_faviconfetcher.rst
deleted file mode 100644
index d7ac2a1..0000000
--- a/developer_manual/app/appframework/api/utility_faviconfetcher.rst
+++ /dev/null
@@ -1,63 +0,0 @@
-FaviconFetcher
-==============
-
-
-
-
-
-.. php:namespace:: OCA\AppFramework\Utility
-.. php:class:: FaviconFetcher
-
-
-
-
- .. php:method:: __construct($apiFactory)
-
- :param \\OCA\\AppFramework\\Utility\\SimplePieAPIFactory $apiFactory:
-
-
- Inject a factory to build a simplepie file object.
- This is needed becausethe file object contains logic in its constructor which makes itimpossible to inject and test
-
-
- .. php:method:: fetch($url)
-
- :param string|null $url: the url where to fetch it from
-
-
- Fetches a favicon from a given URL
-
-
- .. php:method:: extractFromPage($url)
-
- :param string $url: the url to the page
- :returns string: the full url to the page
-
- * **Protected**
-
-
- Tries to get a favicon from a page
-
-
- .. php:method:: isImage($url)
-
- :param string $url: the url to the file
- :returns bool: true if image
-
- * **Protected**
-
-
- Test if the file is an image
-
-
- .. php:method:: buildURL($url)
-
- :param string $url: the url that should be built
- :returns array: an array containing the http and https address
-
- * **Protected**
-
-
- Get HTTP and HTTPS adresses from an incomplete URL
-
-
diff --git a/developer_manual/app/appframework/api/utility_mappertestutility.rst b/developer_manual/app/appframework/api/utility_mappertestutility.rst
deleted file mode 100644
index 1b2f148..0000000
--- a/developer_manual/app/appframework/api/utility_mappertestutility.rst
+++ /dev/null
@@ -1,45 +0,0 @@
-MapperTestUtility
-=================
-
-
-Simple utility class for testing mappers
-
-
-.. php:namespace:: OCA\AppFramework\Utility
-.. php:class:: MapperTestUtility
-
- * **Abstract**
-
-
- .. php:attr:: $api
-
- * **Protected**
-
-
-
-
-
- .. php:method:: beforeEach()
-
-
- * **Protected**
-
-
- Run this function before the actual test to either set or initialize theapi.
- After this the api can be accessed by using $this->api
-
-
- .. php:method:: setMapperResult($sql, $arguments=array(), $returnRows=array(), $limit=null, $offset=null)
-
- :param string $sql: the sql query that you expect to receive
- :param array $arguments: the expected arguments for the prepare querymethod
- :param array $returnRows: the rows that should be returned for the resultof the database query. If not provided, it wont be assumed that fetchRowwill be called on the result
- :param mixed $limit:
- :param mixed $offset:
-
- * **Protected**
-
-
- Create mocks and set expected results for database queries
-
-
diff --git a/developer_manual/app/appframework/api/utility_methodannotationreader.rst b/developer_manual/app/appframework/api/utility_methodannotationreader.rst
deleted file mode 100644
index 79fc513..0000000
--- a/developer_manual/app/appframework/api/utility_methodannotationreader.rst
+++ /dev/null
@@ -1,29 +0,0 @@
-MethodAnnotationReader
-======================
-
-
-Reads and parses annotations from doc comments
-
-
-.. php:namespace:: OCA\AppFramework\Utility
-.. php:class:: MethodAnnotationReader
-
-
-
-
- .. php:method:: __construct($object, $method)
-
- :param object $object: an object or classname
- :param string $method: the method which we want to inspect for annotations
-
-
-
- .. php:method:: hasAnnotation($name)
-
- :param string $name: the name of the annotation
- :returns bool: true if the annotation is found
-
-
- Check if a method contains an annotation
-
-
diff --git a/developer_manual/app/appframework/api/utility_simplepieapifactory.rst b/developer_manual/app/appframework/api/utility_simplepieapifactory.rst
deleted file mode 100644
index 6867d53..0000000
--- a/developer_manual/app/appframework/api/utility_simplepieapifactory.rst
+++ /dev/null
@@ -1,37 +0,0 @@
-SimplePieAPIFactory
-===================
-
-
-
-
-
-.. php:namespace:: OCA\AppFramework\Utility
-.. php:class:: SimplePieAPIFactory
-
-
-
-
- .. php:method:: getFile($url, $timeout=10, $redirects=5, $headers=null, $useragent=null, $force_fsockopen=false)
-
- :param mixed $url:
- :param mixed $timeout:
- :param mixed $redirects:
- :param mixed $headers:
- :param mixed $useragent:
- :param mixed $force_fsockopen:
- :returns \\OCA\\AppFramework\\Utility\\SimplePie_File: a new object
-
-
- Builds a simplepie file object.
- This is needed becausethe file object contains logic in its constructor which makes itimpossible to inject and test
-
-
- .. php:method:: getCore()
-
- :returns \\SimplePie_Core: instance
-
-
- Returns a new instance of a SimplePie_Core() object.
- This is neededbecause the class relies on external dependencies which are not passedin via the constructor and thus making it nearly impossible to unittestcode that uses this class
-
-
diff --git a/developer_manual/app/appframework/api/utility_testutility.rst b/developer_manual/app/appframework/api/utility_testutility.rst
deleted file mode 100644
index 862e987..0000000
--- a/developer_manual/app/appframework/api/utility_testutility.rst
+++ /dev/null
@@ -1,26 +0,0 @@
-TestUtility
-===========
-
-
-Simple utility class for testing anything using an api
-
-
-.. php:namespace:: OCA\AppFramework\Utility
-.. php:class:: TestUtility
-
- * **Abstract**
-
-
-
-
- .. php:method:: getAPIMock($apiClass='OCA\AppFramework\Core\API', $constructor=array('appname'))
-
- :param string $apiClass: the class inclusive namespace of the api that we want to use
- :param array $constructor: constructor parameters of the api class
-
- * **Protected**
-
-
- Boilerplate function for getting an API Mock class
-
-
diff --git a/developer_manual/app/appframework/api/utility_timefactory.rst b/developer_manual/app/appframework/api/utility_timefactory.rst
deleted file mode 100644
index 39377cb..0000000
--- a/developer_manual/app/appframework/api/utility_timefactory.rst
+++ /dev/null
@@ -1,19 +0,0 @@
-TimeFactory
-===========
-
-
-Needed to mock calls to time()
-
-
-.. php:namespace:: OCA\AppFramework\Utility
-.. php:class:: TimeFactory
-
-
-
-
- .. php:method:: getTime()
-
- :returns int: the result of a call to time()
-
-
-
diff --git a/developer_manual/app/appframework/classloader.rst b/developer_manual/app/appframework/classloader.rst
deleted file mode 100644
index f794312..0000000
--- a/developer_manual/app/appframework/classloader.rst
+++ /dev/null
@@ -1 +0,0 @@
-.. include:: ../app/classloader.rst
\ No newline at end of file
diff --git a/developer_manual/app/appframework/controllers.rst b/developer_manual/app/appframework/controllers.rst
deleted file mode 100644
index cf105b8..0000000
--- a/developer_manual/app/appframework/controllers.rst
+++ /dev/null
@@ -1,148 +0,0 @@
-Controllers
-===========
-
-.. sectionauthor:: Bernhard Posselt <nukeawhale at gmail.com>
-
-The App Framework provides a simple baseclass for adding controllers: :php:class:`OCA\\AppFramework\\Controller\\Controller`. Controllers connect your view (templates) with your database and contain the logic of your app. Controllers themselves are connected to one or more routes. Controllers go into the **controller/** directory.
-
-A controller should be created for each resource. Think of it as an URL scheme::
-
- /controller/method/params
-
-For instance::
-
- /file/1
-
-In this case we would create a controller named **FileController** and the method would be called **get()**.
-
-
-A simple controller would look like:
-
-.. code-block:: php
-
- <?php
-
- namespace OCA\YourApp\Controller;
-
- use \OCA\AppFramework\Controller\Controller;
- use \OCA\AppFramework\Http\JSONResponse;
-
-
- class MyController extends Controller {
-
-
- /**
- * @param Request $request an instance of the request
- * @param API $api an api wrapper instance
- */
- public function __construct($api, $request){
- parent::__construct($api, $request);
- }
-
-
- /**
- * @Ajax
- *
- * sets a global system value
- */
- public function myControllerMethod(){
- return new JSONResponse(array('value' => $this->params('somesetting')));
- }
-
- }
-
- ?>
-
-An instance of the API is passed via :doc:`../general/dependencyinjection`, the same goes for a :php:class:`OCA\\AppFramework\\Http\\Request` instance. URL Parameters, POST, GET and FILES parameters are partly abstracted by the Request class and can be accessed via **$this->params('myURLParamOrPostOrGetKey')** and **$this->getUploadedFile($key)** inside the controller. This has been done to make the app better testable.
-
-If you want to access environment variables($_ENV), use **$this->env($key)**.
-Session and cookie variables can be accessed via **session** and **cookie**
-methods. For example, to get a value of a variable from cookie:
-**$this->cookie($key_name)**. Not like cookie, which is read only, session
-variables can also be changed using: **$this->session($key_name,
-$value_name)**.
-
-Every controller method has to return a Response object. The currently available Responses from the App Framework include:
-
-* :php:class:`OCA\\AppFramework\\Http\\Response`: response for sending headers only
-* :php:class:`OCA\\AppFramework\\Http\\JSONResponse`: sends JSON to the client
-* :php:class:`OCA\\AppFramework\\Http\\TemplateResponse`: renders a template
-* :php:class:`OCA\\AppFramework\\Http\\RedirectResponse`: redirects to a new URL
-* :php:class:`OCA\\AppFramework\\Http\\TextDownloadResponse`: prompts the user to download a text file containing a passed string
-* :php:class:`OCA\\AppFramework\\Http\\TextResponse`: for printing text like XML
-
-.. versionadded:: 6.0
-
-* :php:class:`OCA\\AppFramework\\Http\\ForbiddenResponse`: returns 403 Forbidden HTTP status. If you want to transport content, use a different response and set the HTTP status code in there
-* :php:class:`OCA\\AppFramework\\Http\\NotFoundResponse`: returns 404 Not Found HTTP status. If you want to transport content, use a different response and set the HTTP status code in there
-
-Should you require to set additional headers, you can use the :php:meth:`OCA\\AppFramework\\Http\\Response::addHeader` method that every Response has.
-
-Because TemplateResponse is quite common, the controller provides a shortcut method for both of them, namely **$this->render**:
-
-.. code-block:: php
-
- <?
-
- /**
- * @CSRFExemption
- */
- public function index(){
- $templateName = 'main';
- $params = array(
- 'somesetting' => 'How long will it take'
- );
-
- return $this->render($templateName, $params);
- }
-
-
-
-For security reasons, all security checks for controller methods are turned on by default. To explicitely turn off checks, you must use exemption annotations above the desired method.
-
-In this example, all security checks would be disabled (**not recommended**):
-
-
-.. code-block:: php
-
- <?php
- /**
- * @CSRFExemption
- * @IsAdminExemption
- * @IsLoggedInExemption
- * @IsSubAdminExemption
- */
- public function index(){
- $templateName = 'main';
- $params = array(
- 'somesetting' => 'How long will it take'
- );
-
- return $this->render($templateName, $params);
- }
-
-Possible Annotations contain:
-
-* **@CSRFExemption**: Turns off the check for the `CSRF <http://en.wikipedia.org/wiki/Cross-site_request_forgery>`_ token. **Only use this for the index page**!
-
-* **@IsAdminExemption**: Turns off the check if the user is an admin
-
-* **@IsLoggedInExemption**: Turns off the check if the user is logged in
-
-* **@IsSubAdminExemption**: Turns off the check if the user is a subadmin
-
-* **@Ajax**: Use this for Ajax Requests. It prevents the unneeded rendering of the apps navigation and returns error messages in JSON format
-
-Don't forget to add your controller to the dependency injection container in :file:`dependencyinjection/dicontainer.php`
-
-.. code-block:: php
-
- <?php
-
- // in the constructor function
-
- $this['MyController'] = function($c){
- return new MyController($c['API'], $c['Request']);
- };
-
- ?>
diff --git a/developer_manual/app/appframework/css.rst b/developer_manual/app/appframework/css.rst
deleted file mode 100644
index f4a5fcc..0000000
--- a/developer_manual/app/appframework/css.rst
+++ /dev/null
@@ -1 +0,0 @@
-.. include:: ../app/css.rst
\ No newline at end of file
diff --git a/developer_manual/app/appframework/data-migration.rst b/developer_manual/app/appframework/data-migration.rst
deleted file mode 100644
index 92960e2..0000000
--- a/developer_manual/app/appframework/data-migration.rst
+++ /dev/null
@@ -1 +0,0 @@
-.. include:: ../app/data-migration.rst
\ No newline at end of file
diff --git a/developer_manual/app/appframework/database.rst b/developer_manual/app/appframework/database.rst
deleted file mode 100644
index b58d925..0000000
--- a/developer_manual/app/appframework/database.rst
+++ /dev/null
@@ -1,157 +0,0 @@
-Database Access
-===============
-
-.. sectionauthor:: Bernhard Posselt <nukeawhale at gmail.com>
-
-Your database layer should go into the **db/** folder. It's recommended to split the data entities from the database queries. You can do that by creating a very simple PHP object which extends the class :php:class:`OCA\\AppFramework\\Db\\Entity`. This object will hold the data.
-
-Getters and setters will automatically be created for all public attributes. Should it be required to use special setter or getters, simply create the method. Make sure to mark the field as updated by calling the parent method.
-
-.. note:: Setters mark a field as updated. The :php:meth:`OCA\\AppFramework\\Db\\Entity::fromRow` method should only be used to pass in rows from a database result. Fields will not be marked as updated by using :php:meth:`OCA\\AppFramework\\Db\\Entity::fromRow`!
-
-:php:meth:`OCA\\AppFramework\\Db\\Entity::fromRow` maps the database columns to attributes. The conversion works like the this:
-
-* database column **my_name** gets transformed to attribute **myName**.
-* the attribute **myAwesomeProperty** gets transformed to the database column **my_awesome_property**
-
-.. versionchanged:: 6.0 Instead of manually creating and mapping all the entities, this is is now done by extending a parent class.
-
-:file:`db/item.php`
-
-.. code-block:: php
-
- <?php
- namespace \OCA\YourApp\Db;
-
- use \OCA\AppFramework\Db\Entity
-
- class Item extends Entity {
-
- // Note: a field id is set automatically by the parent class
- public $name;
- public $path;
- public $user;
- public $timestamp;
-
- public function __construct(){
- // cast timestamp to an int when fromRow is being called
- // the second parameter is the argument that is passed to
- // the php function settype()
- $this->addType('timestamp', 'int')
- }
-
-
- // transform username to lower case
- public function function setName($name){
- $name = strtolower($name);
- parent::setName($name);
- }
-
- }
-
-
-All database queries for that object should be put into a mapper class. This follows the `data mapper pattern <http://www.martinfowler.com/eaaCatalog/dataMapper.html>`_. Simply inherit the :php:class:`OCA\\AppFramework\\Db\\Mapper`.
-
-
-.. versionchanged:: 6.0: Methods from the old mapper have been removed and deprecated to allow a small ORM.
-
-:file:`db/itemmapper.php`
-
-.. code-block:: php
-
- <?php
- namespace \OCA\YourApp\Db;
-
- use \OCA\AppFramework\Db\Mapper;
-
-
- class ItemMapper extends Mapper {
-
-
- public function __construct(API $api) {
- parent::__construct($api, 'news_feeds'); // tablename is news_feeds
- }
-
-
- public function find($id, $userId){
- $sql = 'SELECT * FROM `' . $this->getTableName() . '` ' .
- 'WHERE `id` = ? ' .
- 'AND `user_id` = ?';
-
- // use findOneQuery to throw exceptions when no entry or more than one
- // entries were found
- $row = $this->findOneQuery($sql, array($id, $userId));
- $feed = new Item();
- $feed->fromRow($row);
-
- return $feed;
- }
-
-
- public function findByName($name){
- $sql = 'SELECT * FROM `' . $this->getTableName() . '` ' .
- 'WHERE `name` = ? ';
-
- $row = $this->execute($sql, array($name));
- $feed = new Item();
- $feed->fromRow($row);
-
- return $feed;
- }
-
- }
-
-.. note:: Always use **?** to mark placeholders for arguments in SQL queries and pass the arguments as a second parameter to the execute function to prevent `SQL Injection <http://php.net/manual/en/security.database.sql-injection.php>`_
-
-**DONT**:
-
-.. code-block:: php
-
- <?php
- $sql = 'SELECT * FROM `' . $this->getTableName() . '` WHERE `user` = ' . $user;
- $result = $this->execute($sql);
-
-
-**DO**:
-
-.. code-block:: php
-
- <?php
- $sql = 'SELECT * FROM `' . $this->getTableName() . '` WHERE `user` = ?';
- $params = array($userId);
-
- $result = $this->execute($sql, $params);
-
-
-The mapper class comes with simple methods for deleting, updating and finding items. To delete a database entry, simply pass an entity with an id to the :php:meth:`OCA\\AppFramework\\Db\\Mapper::delete` method.
-
-Example:
-
-.. code-block:: php
-
- <?php
-
- // delete the item with id 4
- $item = new Item();
- $item->setId(4);
-
- $mapper = new ItemMapper($api); // inject API class for db access
- $mapper->delete($item);
-
-
-The same works for updating. Only the fields which have been set with setters will be updated.
-
-Example:
-
-.. code-block:: php
-
- <?php
-
- // change the name of item with id 4
- $item = new Item();
- $item->setId(4);
- $item->setName('tony');
-
-
- $mapper = new ItemMapper($api); // inject API class for db access
- $mapper->update($item);
diff --git a/developer_manual/app/appframework/filesystem.rst b/developer_manual/app/appframework/filesystem.rst
deleted file mode 100644
index a7caf5f..0000000
--- a/developer_manual/app/appframework/filesystem.rst
+++ /dev/null
@@ -1 +0,0 @@
-.. include:: ../app/filesystem.rst
\ No newline at end of file
diff --git a/developer_manual/app/appframework/hooks.rst b/developer_manual/app/appframework/hooks.rst
deleted file mode 100644
index da26bf6..0000000
--- a/developer_manual/app/appframework/hooks.rst
+++ /dev/null
@@ -1 +0,0 @@
-.. include:: ../app/hooks.rst
\ No newline at end of file
diff --git a/developer_manual/app/appframework/index.rst b/developer_manual/app/appframework/index.rst
deleted file mode 100644
index 4c1b359..0000000
--- a/developer_manual/app/appframework/index.rst
+++ /dev/null
@@ -1,27 +0,0 @@
-================================
-App Development (App Framework)
-================================
-
-.. toctree::
- :maxdepth: 1
-
- tutorial
- info
- classloader
- container
- routes
- controllers
- schema
- database
- templates
- static
- css
- angularsetup
- angular
- ../app/acceptancetesting
- unittesting
- middleware
- filesystem
- hooks
- data-migration
- api/index
diff --git a/developer_manual/app/appframework/info.rst b/developer_manual/app/appframework/info.rst
deleted file mode 100644
index 73aa057..0000000
--- a/developer_manual/app/appframework/info.rst
+++ /dev/null
@@ -1 +0,0 @@
-.. include:: ../app/info.rst
\ No newline at end of file
diff --git a/developer_manual/app/appframework/middleware.rst b/developer_manual/app/appframework/middleware.rst
deleted file mode 100644
index fabbe26..0000000
--- a/developer_manual/app/appframework/middleware.rst
+++ /dev/null
@@ -1,69 +0,0 @@
-Middleware
-==========
-
-.. sectionauthor:: Bernhard Posselt <nukeawhale at gmail.com>
-
-
-Middleware is logic that is run before and after each request and is modelled after `Django's Middleware system <https://docs.djangoproject.com/en/dev/topics/http/middleware/>`_. It offers the following hooks:
-
-* **beforeController**: This is executed before a controller method is being executed. This allows you to plug additional checks or logic before that method, like for instance security checks
-* **afterException**: This is being run when either the beforeController method or the controller method itself is throwing an exception. The middleware is asked in reverse order to handle the exception and to return a response. If the middleware can't handle the exception, it throws the exception again
-* **afterController**: This is being run after a successful controllermethod call and allows the manipulation of a Response object. The middleware is run in reverse order
-* **beforeOutput**: This is being run after the response object has been rendered and allows the manipulation of the outputted text. The middleware is run in reverse order
-
-To generate your own middleware, simply inherit from the Middleware class :php:class:`OCA\\AppFramework\\Middleware\\Middleware`: and overwrite the methods that you want to use.
-
-
-.. code-block:: php
-
- <?php
-
- use \OCA\AppFramework\Middleware\Middleware;
-
-
- class CensorMiddleware extends Middleware {
-
- private $api;
-
- /**
- * @param API $api an instance of the api
- */
- public function __construct($api){
- $this->api = $api;
- }
-
-
- /**
- * this replaces "fuck" with "****"" in the output
- */
- public function beforeOutput($controller, $methodName, $output){
- return str_replace($output, 'fuck', '****');
- }
-
- }
-
-To activate the middleware, you have to overwrite the :php:class:`OCA\\AppFramework\\Middleware\\MiddlewareDispatcher`: in the DIContainer constructor:
-
-.. note:: If you ship your own middleware, be sure to also enable the existing ones like the **SecurityMiddleware** if you overwrite the MiddlewareDispatcher in the Dependency Injection Container! **If this is forgotten, there will be security issues**!
-
-.. code-block:: php
-
- <?php
-
- // in the constructor
-
- $this['CensorMiddleware'] = function($c){
- return new CensorMiddleware($c['API']);
- };
-
- $this['MiddlewareDispatcher'] = function($c){
- $dispatcher = new \OCA\AppFramework\Middleware\MiddlewareDispatcher();
- $dispatcher->registerMiddleware($c['HttpMiddleware']);
- $dispatcher->registerMiddleware($c['SecurityMiddleware']);
- $dispatcher->registerMiddleware($c['CensorMiddleware']);
- return $dispatcher;
- };
-
-.. note::
-
- The order is important! The middleware that is registered first gets run first in the **beforeController** method. For all other hooks, the order is being reversed, meaning: if a middleware is registered first, it gets run last.
diff --git a/developer_manual/app/appframework/routes.rst b/developer_manual/app/appframework/routes.rst
deleted file mode 100644
index fbe6aea..0000000
--- a/developer_manual/app/appframework/routes.rst
+++ /dev/null
@@ -1,69 +0,0 @@
-.. include:: ../app/routes.rst
-
-Using Controllers
------------------
-
-To call your controllers the App Framework provides a main method: :php:class:`OCA\\AppFramework\\App`.
-
-.. note:: If you call a controller directly no security checks will be performed! Security checks are handled by the :php:class:`OCA\\AppFramework\\Middleware\\Security\\SecurityMiddleware` and called inside the :php:meth:`OCA\\AppFramework\\App::main` method! Always use the :php:meth:`OCA\\AppFramework\\App::main` method!
-
-.. code-block:: php
-
- <?php
- use \OCA\AppFramework\App;
- use \OCA\YourApp\DependencyInjection\DIContainer;
-
- $this->create('yourappname_routename', '/myurl/{key}')->action(
- function($params){
- App::main('MyController', 'methodName', $params, new DIContainer());
- }
- )->defaults('key' => 'john');
-
-The first parameter is the name under which the controller was defined in the :file:`dependencyinjection/dicontainer.php`.
-
-The second parameter is the name of the method that should be called on the controller.
-
-The third parameter is the $params array which is passed to the controller and available by using **$this->params($key)** in the controller method. In the following example, the parameter in the URL would be accessible by using: **$this->params('key')**
-
-You can also limit the route to GET or POST requests by simply adding **->post()** or **->get()** before the action method like:
-
-.. code-block:: php
-
- <?php
- use \OCA\AppFramework\App;
- use \OCA\YourApp\DependencyInjection\DIContainer;
-
- $this->create('yourappname_routename', '/myurl/{key}')->post()->action(
- function($params){
- App::main('MyController', 'methodName', $params, new DIContainer());
- }
- );
- ?>
-
-The fourth parameter is an instance of the **DIContainer** (see :doc:`../general/dependencyinjection`). If you want to replace objects in the container only for a certain request, you can do it like this:
-
-.. code-block:: php
-
- <?php
- use \OCA\AppFramework\App;
- use \OCA\YourApp\DependencyInjection\DIContainer;
-
- $this->create('yourappname_routename', '/myurl/{key}')->post()->action(
- function($params){
- $container = new DIContainer();
- $container['SomeClass'] = function($c){
- return new SomeClass('different');
- }
- App::main('MyController', 'methodName', $params, $container);
- }
- );
- ?>
-
-Twig
-~~~~
-
-The Twig templates also provide a function to create a link from a route :js:func:`url` function:
-
-.. code-block:: js
-
- {{ url('yourappname_routename', {key: '1'}) }}
diff --git a/developer_manual/app/appframework/schema.rst b/developer_manual/app/appframework/schema.rst
deleted file mode 100644
index 70be9d5..0000000
--- a/developer_manual/app/appframework/schema.rst
+++ /dev/null
@@ -1 +0,0 @@
-.. include:: ../app/schema.rst
\ No newline at end of file
diff --git a/developer_manual/app/appframework/static.rst b/developer_manual/app/appframework/static.rst
deleted file mode 100644
index 3f5361d..0000000
--- a/developer_manual/app/appframework/static.rst
+++ /dev/null
@@ -1 +0,0 @@
-.. include:: ../app/static.rst
\ No newline at end of file
diff --git a/developer_manual/app/appframework/templates.rst b/developer_manual/app/appframework/templates.rst
deleted file mode 100644
index fa3b751..0000000
--- a/developer_manual/app/appframework/templates.rst
+++ /dev/null
@@ -1,185 +0,0 @@
-.. include:: ../app/templates.rst
-
-
-Templates are abstracted by the TemplateResponse object and used and returned inside the controller method. Variables can be assigned to the Template by using the :php:class:`OCA\\AppFramework\\Http\\TemplateResponse::setParams` method:
-
-:file:`controllers/yourcontroller.php`
-
-.. code-block:: php
-
- <?php
- use \OCA\AppFramework\Http\TemplateResponse;
-
- // inside the controller
-
- public function index(){
-
- // main is the template name. Owncloud will look for template/main.php
- $response = new TemplateResponse($this->api, 'main');
-
- $params = array('entries' => array('this', 'is', 'your', 'father', 'speaking'));
- $response->setParams($params);
-
- return $response;
- }
-
-The App Framework also provides the option of using `Twig Templates <http://twig.sensiolabs.org/>`_ which can optionally be enabled. Templates reside in the **templates/** folder.
-
-
-Twig Templates (recommended)
-----------------------------
-ownCloud templates do a bad job at preventing `XSS <http://en.wikipedia.org/wiki/Cross-site_scripting>`_. Therefore the App Framework comes with a second option: the `Twig Templating Language <http://twig.sensiolabs.org/>`_.
-
-Twig Templates are enabled by using the Twig Middleware. If a Twig template directory is set in the :file:`dependencyinjection/dicontainer.php`, the middleware gets loaded automatically. If no directory is set, theres no additional overhead.
-
-To enable them in the :file:`dependencyinjection/dicontainer.php`, add the following line to the constructor:
-
-.. code-block:: php
-
- <?php
-
- // in the constructor
-
- // use this to specify the template directory
- $this['TwigTemplateDirectory'] = __DIR__ . '/../templates';
-
-Twig can also cache templates as simple PHP files. To make use of this, create a **cache/** directory in your app and add the following line to the :file:`dependencyinjection/dicontainer.php`:
-
-.. code-block:: php
-
- <?php
-
- // in the constructor
-
- // if you want to cache the template directory, add this path
- $this['TwigTemplateCacheDirectory'] = __DIR__ . '/../cache';
-
-
-A full reference can be found on the `Twig Template Reference <http://twig.sensiolabs.org/doc/templates.html>`_.
-
-If you want to use Twig together with AngularJS the variable print characters **{{}}** of Angular will have to be adjusted. You can do that by setting a different **$interpolateProvider** in the :file:`coffee/app.coffee` config section:
-
-.. code-block:: js
-
- app.config(['$interpolateProvider', function($interpolateProvider) {
- $interpolateProvider.startSymbol('[[');
- $interpolateProvider.endSymbol(']]');
- }]);
-
-After adding the above lines, Angular will use **[[]]** for evaluation variables.
-
-Additional Twig Extensions
-~~~~~~~~~~~~~~~~~~~~~~~~~~
-The App Framework comes with additional template functions for Twig to better integrate with ownCloud. The following additional functions are provided:
-
-
-.. js:function:: url(route, params=null)
-
- :param string route: the name of the route
- :param string params: the params written like a JavaScript object
-
- Prints the URL for a route.
-
- An example would be:
-
- .. code-block:: js
-
- {{ url('yourapp_route_name', {value: 'hi'}) }}
-
-
-.. js:function:: abs_url(route, params=null)
-
- :param string route: the name of the route
- :param string params: the params written like a JavaScript object
-
- Same as :js:func:`url` but prints an absolute URL
-
- An example would be:
-
- .. code-block:: js
-
- {{ abs_url('yourapp_route_name', {value: 'hi'}) }}
-
-
-.. js:function:: trans(toTranslate, params=null)
-
- :param string toTranslate: the string which should be translated
- :param string params: the params that should be replaced in the string
-
- Enables translation in the templates
-
- An example would be:
-
- .. code-block:: js
-
- {{ trans('Translate %s %s', 'this', 'and this') }}
-
-
-.. js:function:: script(path, appName=null)
-
- :param string path: path to the JavaScript file in the **js/** folder in the app. The **.js** extension is automatically added.
- :param string appName: name of the app. If no value is given, the current app will be used.
-
- .. versionadded:: 6.0
-
- Adds a JavaScript file inside the template
-
- An example would be:
-
- .. code-block:: js
-
- // to include the js/public/app.js in your app use
- {{ script('public/app') }}
-
-
-.. js:function:: style(path, appName=null)
-
- :param string path: path to the CSS file in the **css/** folder in the app. The **.css** extension is automatically added.
- :param string appName: name of the app. If no value is given, the current app will be used.
-
- .. versionadded:: 6.0
-
- Adds a CSS file inside the template
-
- An example would be:
-
- .. code-block:: js
-
- // to include the css/style.css in your app use
- {{ style('style') }}
-
-
-.. js:function:: image_path(path, appName=null)
-
- :param string path: path to an image file in the **img/** folder in the app.
- :param string appName: name of the app. If no value is given, the current app will be used.
-
- .. versionadded:: 6.0
-
- Returns the link to an image
-
- An example would be:
-
- .. code-block:: html
-
- // to include the img/icon.png in your app use
- <img src="{{ image_path('icon.png') }}" />
-
-
-.. js:function:: link_to(path, appName=null)
-
- :param string path: path to a file
- :param string appName: name of the app. If no value is given, the current app will be used.
-
- .. versionadded:: 6.0
-
- Returns the link to a file
-
- An example would be:
-
- .. code-block:: html
-
- // to include the files/my.pdf in your app use
- <a href="{{ link_to('files/my.pdf') }}">my pdf</a>
-
-
diff --git a/developer_manual/app/appframework/tutorial.rst b/developer_manual/app/appframework/tutorial.rst
deleted file mode 100644
index 1e094ee..0000000
--- a/developer_manual/app/appframework/tutorial.rst
+++ /dev/null
@@ -1,181 +0,0 @@
-App Tutorial
-============
-
-.. sectionauthor:: Bernhard Posselt <nukeawhale at gmail.com>
-
-This tutorial contains the MVC approach to write an app and continues where :doc:`../intro/createapp` left off. The result will be a simple "Hello World" app.
-
-To make use of the App Framwork app it must be cloned and activated first by linking it into the app directory:
-
-.. code-block:: bash
-
- cd /var/www
- sudo git clone https://github.com/owncloud/appframework.git
- sudo chown -R user:group /var/www/appframework
- sudo ln -s /var/www/appframework /var/www/owncloud/apps
-
-.. note:: This is **only recommended for development**! If a normal installation is used, place it inside the apps directory!
-
-After that activate it on the apps page.
-
-Create an navigation entry
---------------------------
-The **app.php** will always loaded for every app and can for instance be used to load additional JavaScript for the files app. Therefore the navigation entry has to be registered in this file.
-
-.. note:: The icon **img/example.png** needs to exist or the navigation will throw an error
-
-:file:`appinfo/app.php`
-
-.. code-block:: php
-
- <?php
-
- namespace OCA\MyApp;
-
- // dont break owncloud when the appframework is not enabled
- if(\OCP\App::isEnabled('appframework')){
-
- $api = new \OCA\AppFramework\Core\API('myapp');
-
- $api->addNavigationEntry(array(
-
- // the string under which your app will be referenced in owncloud
- 'id' => $api->getAppName(),
-
- // sorting weight for the navigation. The higher the number, the higher
- // will it be listed in the navigation
- 'order' => 10,
-
- // the route that will be shown on startup
- 'href' => $api->linkToRoute('myapp_index'),
-
- // the icon that will be shown in the navigation
- // this file needs to exist in img/example.png
- 'icon' => $api->imagePath('example.png'),
-
- // the title of your application. This will be used in the
- // navigation or on the settings page of your app
- 'name' => $api->getTrans()->t('My notes app')
-
- ));
- } else {
- $msg = 'Can not enable the MyApp app because the App Framework App is disabled';
- \OCP\Util::writeLog('myapp', $msg, \OCP\Util::ERROR);
- }
-
-First Page
-----------
-Now that the basic files are created, the following things are needed to create a page:
-
-* **A route**: The URL which links to the controller
-* **A controller**: Gets the request and returns a response
-* **An entry in the DIContainer**: This makes the controller available for the application
-* **A template**: HTML which should be displayed on the page
-
-
-Create the main route
----------------------
-:doc:`routes` map the URL to functions and allow to extract values. To show the content when the navigation entry is clicked, the index route which was defined in the :file:`appinfo/app.php` needs to be created:
-
-:file:`appinfo/routes.php`
-
-.. code-block:: php
-
- <?php
-
- namespace OCA\MyApp;
-
- use \OCA\AppFramework\App;
- use \OCA\MyApp\DependencyInjection\DIContainer;
-
- $this->create('myapp_index', '/')->action(
- function($params){
- // call the index method on the class PageController
- App::main('PageController', 'index', $params, new DIContainer());
- }
- );
-
-Write the logic (Controller)
-----------------------------
-The :doc:`controllers` to which the route links does not exist yet and it has to be created:
-
-:file:`controller/pagecontroller.php`
-
-.. code-block:: php
-
- <?php
-
- namespace OCA\MyApp\Controller;
-
- use \OCA\AppFramework\Controller\Controller;
-
-
- class PageController extends Controller {
-
-
- public function __construct($api, $request){
- parent::__construct($api, $request);
- }
-
-
- /**
- * ATTENTION!!!
- * The following comments turn off security checks
- * Please look up their meaning in the documentation!
- *
- * @CSRFExemption
- * @IsAdminExemption
- * @IsSubAdminExemption
- */
- public function index(){
- return $this->render('main', array(
- 'msg' => 'Hello World'
- ));
- }
-
-
- }
-
-Create the template
--------------------
-Now create the :doc:`templates` which contains the HTML
-
-:file:`templates/main.php`
-
-.. code-block:: html
-
- <div>{{ msg }}</div>
-
-
-Wire everything together
-------------------------
-The last thing that is left is to tell the application how the controller needs to be created. The App Framework makes heavy use of :doc:`../general/dependencyinjection` and provides an :doc:`IoC Container <container>`. Inside this container, the controller needs to be created:
-
-:file:`dependencyinjection/dicontainer.php`
-
-.. code-block:: php
-
- <?php
-
- namespace OCA\MyApp\DependencyInjection;
-
- use \OCA\AppFramework\DependencyInjection\DIContainer as BaseContainer;
-
- use \OCA\MyApp\Controller\PageController;
-
- class DIContainer extends BaseContainer {
-
- public function __construct(){
- parent::__construct('myapp');
-
- // use this to specify the template directory
- $this['TwigTemplateDirectory'] = __DIR__ . '/../templates';
-
- $this['PageController'] = function($c){
- return new PageController($c['API'], $c['Request']);
- };
- }
-
- }
-
-Congratulations! The message "Hello World" can now be seen on the main page of your app.
diff --git a/developer_manual/app/appframework/unittesting.rst b/developer_manual/app/appframework/unittesting.rst
deleted file mode 100644
index f96e09e..0000000
--- a/developer_manual/app/appframework/unittesting.rst
+++ /dev/null
@@ -1,157 +0,0 @@
-Unittests
-=========
-
-.. sectionauthor:: Bernhard Posselt <nukeawhale at gmail.com>
-
-The App Framework ships with several useful tools to do unittesting
-
-PHP
----
-
-.. note:: App Unittests should **not depend on a running ownCloud instance**! They should be able to run in isolation. To achieve that, abstract the ownCloud core functions and static methods in the App Framework :file:`core/api.php` and use a mock for testing. If a class is not static, you can simply add it in the :file:`dependencyinjection/dicontainer.php`
-
-.. note:: Also use your app's namespace in your test classes to avoid possible conflicts when the test is run on the buildserver
-
-Unittests go into your **tests/** directory. Create the same folder structure in the tests directory like on your app to make it easier to find tests for certain classes.
-
-ownCloud uses `PHPUnit <http://www.phpunit.de/manual/current/en/>`_
-
-Because of Dependency Injection, unittesting has become very easy: you can easily substitute complex classes with `mocks <http://www.phpunit.de/manual/3.0/en/mock-objects.html>`_ by simply passing a different object to the constructor.
-
-Also using a container like `Pimple <http://pimple.sensiolabs.org/>`_ frees us from doing complex instantiation and object passing in our application by hand.
-
-
-A simple test for a controller would look like this:
-
-
-:file:`tests/controllers/ItemControllerTest.php`
-
-.. code-block:: php
-
- <?php
- namespace OCA\YourApp;
-
- use OCA\AppFramework\Http\Request;
- use OCA\AppFramework\Db\DoesNotExistException;
- use OCA\AppFramework\Utility\ControllerTestUtility;
-
-
- require_once(__DIR__ . "/../classloader.php");
-
-
- class ItemControllerTest extends ControllerTestUtility {
-
-
- public function testSetSystemValue(){
- $post = array('somesetting' => 'this is a test');
- $request = new Request(array(), $post);
-
- // create an api mock object
- $api = $this->getAPIMock();
-
- // expects to be called once with the method
- // setAppValue('somesetting', 'this is a test')
- $api->expects($this->once())
- ->method('setAppValue')
- ->with( $this->equalTo('somesetting'),
- $this->equalTo('this is a test'));
-
- // we want to return the appname yourapp when this method
- // is being called
- $api->expects($this->any())
- ->method('getAppName')
- ->will($this->returnValue('yourapp'));
-
- $controller = new ItemController($api, $request, null);
- $response = $controller->setAppValue(null);
-
- // check if the correct parameters of the json response are set
- $this->assertEquals($post, $response->getParams());
- }
-
-
- }
-
-You can now execute the test by running this in your app directory::
-
- phpunit tests/
-
-.. note:: PHPUnit executes all PHP Files that end with **Test.php**. Be sure to consider that in your file naming.
-
-.. versionadded:: 6.0
-
-TDD can also be used if the :doc:`angularsetup` is performed and grunt is used. To automatically run all PHP unittests on change simply use::
-
- cd js/
- make phpunit
-
-Classloader
-~~~~~~~~~~~
-The generated app has an extra classloader :file:`tests/classloader.php` that loads the the classes. Require this file at the top of your tests.
-
-.. note:: The classloader in the **tests/** directory assumes that the **appframework/** folder is in the same directory as the your app. If you run your app in a different apps folder, you will need to link the App Framework into the same folder where your app folder resides.
-
-
-JavaScript
-~~~~~~~~~~
-.. versionadded:: 6.0
-
-If the :doc:`angularsetup` was performed `Testacular <http://testacular.github.com/0.6.0/index.html>`_ was already successfully set up and can be started with::
-
- cd js/
- make testacular
-
-Testacular now watches for changes and executes all tests if a JavaScript file is changed.
-
-To run the tests once use::
-
- cd js/
- make test
-
-A JUnit compatible result file will be generated for the continous integration server.
-
-Like stated in :doc:`angularsetup` tests go into the folder **js/tests/**. The default setup uses `Jasmine <http://pivotal.github.com/jasmine/>`_ but also other test frameworks like `Mocha <http://visionmedia.github.com/mocha/>`_ or `QUnit <http://qunitjs.com/>`_ can be used but `have to be configured first <http://testacular.github.com/0.6.0/config/files.html>`_.
-
-AngularJS
-~~~~~~~~~
-To include mocks the main container creation has to be overwritten with another file.
-
-:file:`js/tests/stubs/app.js`
-
-.. code-block:: js
-
- angular.module('YourApp', ['ngMock']);
-
-This file should be included in the testfiles in :file:`js/config/testacular_conf.js` instead of :file:`js/app/app.js`
-
-Create a testfile for each JavaScript/CoffeeScript file in the **tests/** folder.
-
-Example:
-
-.. code-block:: python
-
- describe '_Request', ->
-
- # tell inject to ready the app container
- beforeEach module 'YourApp'
-
- # get _Request and _Publisher from the container
- beforeEach inject (_Request, _Publisher) =>
- @router =
- generate: (route, values) ->
- return 'url'
- registerLoadedCallback: (callback) ->
- callback()
- @publisher = new _Publisher()
- @request = _Request
-
-
- it 'should not send requests if not initialized', =>
- # create a mock
- http = jasmine.createSpy('http')
- @router.registerLoadedCallback = ->
- req = new @request(http, @publisher, @router)
-
- req.request('route')
-
- expect(http).not.toHaveBeenCalled()
diff --git a/developer_manual/app/backgroundjobs.rst b/developer_manual/app/backgroundjobs.rst
new file mode 100644
index 0000000..9875917
--- /dev/null
+++ b/developer_manual/app/backgroundjobs.rst
@@ -0,0 +1,4 @@
+Background Jobs (Cron)
+======================
+
+.. sectionauthor:: Bernhard Posselt <dev at bernhard-posselt.com>
\ No newline at end of file
diff --git a/developer_manual/app/classloader.rst b/developer_manual/app/classloader.rst
index ff22590..52de2e1 100644
--- a/developer_manual/app/classloader.rst
+++ b/developer_manual/app/classloader.rst
@@ -3,8 +3,7 @@ Classloader
.. sectionauthor:: Bernhard Posselt <dev at bernhard-posselt.com>
-The classloader is provided by ownCloud and loads all your classes automatically. The only thing left to include by yourself are 3rdparty libraries.
-Note that this means that the classes need to be named and organized in folders according to their full qualifier.
+The classloader is provided by ownCloud and loads all your classes automatically. The only thing left to include by yourself are 3rdparty libraries. Those should be loaded in :file:`appinfo/application.php`.
The classloader works like this:
@@ -33,4 +32,4 @@ The classloader works like this:
require_once '/apps/myapp/controller/pagecontroller.php';
-**In other words**: In order for the PageController class to be autoloaded, the :file:`pagecontroller.php` needs to either be stored in the **/apps/myapp/controller/** folder
\ No newline at end of file
+**In other words**: In order for the PageController class to be autoloaded, the class **\\OCA\MyApp\\Controller\\PageController** needs to either be stored in the :file:`/apps/myapp/controller/pagecontroller.php`
\ No newline at end of file
diff --git a/developer_manual/app/container.rst b/developer_manual/app/container.rst
index 801042d..f715834 100644
--- a/developer_manual/app/container.rst
+++ b/developer_manual/app/container.rst
@@ -1,98 +1,54 @@
-Runtime configuration
-=====================
+App configuration
+=================
-.. sectionauthor:: Bernhard Posselt <nukeawhale at gmail.com>
+.. sectionauthor:: Bernhard Posselt <dev at bernhard-posselt.com>
-The App Framework assembles the application by using an Inversion of Control container which does :doc:`../general/dependencyinjection`. Dependency Injection helps you to create testable code. For a very simple and good Tutorial, watch the `Dependency Injection and the art of Services and Containers Tutorial on YouTube <http://www.youtube.com/watch?v=DcNtg4_i-2w>`_. A broader overview over how it works and what the benefits are can be seen on `Google's Clean Code Talks <http://www.youtub [...]
+The App Framework assembles the application by using an Inversion of Control container which does :doc:`../general/dependencyinjection`. Dependency Injection helps you to create testable and maintainable code. For a very simple and good Tutorial, watch the `Dependency Injection and the art of Services and Containers Tutorial on YouTube <http://www.youtube.com/watch?v=DcNtg4_i-2w>`_. A broader overview over how it works and what the benefits are can be seen on `Google's Clean Code Talks < [...]
-The container is configured in :file:`dependencyinjection/dicontainer.php`. By default `Pimple <http://pimple.sensiolabs.org/>`_ is used as dependency injection container. A `tutorial can be found here <http://jtreminio.com/2012/10/an-introduction-to-pimple-and-service-containers/>`_
+The container is configured in :file:`appinfo/application.php`.
-To add your own classes simply open the :file:`dependencyinjection/dicontainer.php` and add a line like this to the constructor:
+To add your own classes simply open the :file:`appinfo/application.php` and add a line like this to the constructor:
.. code-block:: php
<?php
- class DIContainer extends OCA\AppFramework\DependencyInjection\DIContainer {
+ namespace OCA\MyApp\AppInfo;
- public function __construct(){
- // tell parent container about the app name
- parent::__construct('myapp');
+ use \OCP\AppFramework\App;
- $this['MyClass'] = function($c){
- return new MyClass($c['SomeOtherClass']);
- };
- }
- }
-
-You can also inject and overwrite already existing items from the App Framework.
-
-The App Framework lets you inject/overwrite the following items:
-
-* **API**: The API layer. Overwrite this if you use an API layer that inherited from the App Framework API layer and provides additional methods.
-* **Request**: The Request object which holds the $_POST, $_GET, etc. variables
-* **TwigTemplateDirectory**: If set to the template directory, Twig templates can be used.
-* **TwigTemplateCacheDirectory**: Set this to enable caching for Twig templates
-* **MiddlewareDispatcher**: Can be used to :doc:`add aditional middleware <middleware>`
-
-
-API abstraction layer
-=====================
-
-.. sectionauthor:: Bernhard Posselt <nukeawhale at gmail.com>
-
-ownCloud currently has a ton of static methods which is a very bad thing concerning testability. Therefore the App Framework comes with an :php:class:`OCA\\AppFramework\\Core\\API` abstraction layer (basically a `facade <http://en.wikipedia.org/wiki/Facade_pattern>`_) which wraps the static method calls inside an object.
-
-.. note:: This is a temporary solution until ownCloud offers a proper API with normal classes that can be used in the DIContainer.
-
-This will allow you to easily mock the API in your unittests.
-
-Extend the API
---------------
-If you find yourself in need to use more ownCloud internal static methods simply inherit from the API class:
-
-:file:`core/api.php`
+ use \OCA\MyApp\Controller\PageController;
-.. code-block:: php
-
- <?php
- namespace MyApp\Core;
+ class MyApp extends App {
- class API extends \OCA\AppFramework\Core\API {
- public function __construct($appName){
- parent::__construct($appName);
- }
+ /**
+ * Define your dependencies in here
+ */
+ public function __construct(array $urlParams=array()){
+ parent::__construct('myapp', $urlParams);
+ $container = $this->getContainer();
- public function methodName($someParam){
- \OCP\Util::methodName($this->appName, $someParam);
- }
-
+ /**
+ * Controllers
+ */
+ $container->registerService('PageController', function($c){
+ return new PageController(
+ $c->query('AppName'),
+ $c->query('ServerContainer')->getRequest()
+ );
+ });
+ }
}
-and wire it up in the container:
-
-:file:`dependencyinjection/dicontainer.php`
-
-.. code-block:: php
-
- <?php
- use \OCA\MyApp\Core\API;
+Service provided by core
+========================
+Core provides some predefined services that can be injected into your app. Every service is available from querying the **ServerContainer**::
- class DIContainer extends OCA\AppFramework\DependencyInjection\DIContainer {
-
- public function __construct(){
- // tell parent container about the app name
- parent::__construct('myapp');
-
- $this['API'] = $this->share(function($c){
- return new API($c['AppName']);
- });
- }
- }
- ?>
+ $server = $c->query('ServerContainer')
+ $server->getRequest() // get the request
diff --git a/developer_manual/app/controllers.rst b/developer_manual/app/controllers.rst
new file mode 100644
index 0000000..2b142c1
--- /dev/null
+++ b/developer_manual/app/controllers.rst
@@ -0,0 +1,4 @@
+Controllers
+===========
+
+.. sectionauthor:: Bernhard Posselt <dev at bernhard-posselt.com>
\ No newline at end of file
diff --git a/developer_manual/app/css.rst b/developer_manual/app/css.rst
new file mode 100644
index 0000000..1f9257f
--- /dev/null
+++ b/developer_manual/app/css.rst
@@ -0,0 +1,4 @@
+CSS
+===
+
+.. sectionauthor:: Bernhard Posselt <dev at bernhard-posselt.com>
\ No newline at end of file
diff --git a/developer_manual/app/database.rst b/developer_manual/app/database.rst
new file mode 100644
index 0000000..2ad1e4d
--- /dev/null
+++ b/developer_manual/app/database.rst
@@ -0,0 +1,4 @@
+Database Queries
+================
+
+.. sectionauthor:: Bernhard Posselt <dev at bernhard-posselt.com>
\ No newline at end of file
diff --git a/developer_manual/app/filesystem.rst b/developer_manual/app/filesystem.rst
new file mode 100644
index 0000000..b2d8afd
--- /dev/null
+++ b/developer_manual/app/filesystem.rst
@@ -0,0 +1,4 @@
+Filesystem
+==========
+
+.. sectionauthor:: Bernhard Posselt <dev at bernhard-posselt.com>
\ No newline at end of file
diff --git a/developer_manual/app/filesystembackend.rst b/developer_manual/app/filesystembackend.rst
new file mode 100644
index 0000000..00bac24
--- /dev/null
+++ b/developer_manual/app/filesystembackend.rst
@@ -0,0 +1,4 @@
+Filesystem Backends
+===================
+
+.. sectionauthor:: Bernhard Posselt <dev at bernhard-posselt.com>
\ No newline at end of file
diff --git a/developer_manual/app/app/hooks.rst b/developer_manual/app/hooks.rst
similarity index 97%
rename from developer_manual/app/app/hooks.rst
rename to developer_manual/app/hooks.rst
index b6f2a92..a1b90f7 100644
--- a/developer_manual/app/app/hooks.rst
+++ b/developer_manual/app/hooks.rst
@@ -1,6 +1,8 @@
Hooks
=====
+.. sectionauthor:: Bernhard Posselt <dev at bernhard-posselt.com>
+
In ownCloud apps, function or methods (event handlers) which are used by the app and called by ownCloud core hooks, are generally stored in :file:`apps/appname/lib/hooks.php`. Hooks are a way of implementing the `observer
pattern`_, and are commonly used by web platform applications to provide clean
interfaces to third party applications which need to modify core application
diff --git a/developer_manual/app/index.rst b/developer_manual/app/index.rst
index de3678e..94f626f 100644
--- a/developer_manual/app/index.rst
+++ b/developer_manual/app/index.rst
@@ -13,10 +13,10 @@ App Development
../general/index
tutorial
main
- classloader
container
routes
info
+ classloader
controllers
schema
database
@@ -26,7 +26,12 @@ App Development
middleware
hooks
backgroundjobs
+ filesystem
+ users
+ l10n
api
+ userbackend
+ filesystembackend
testing
@@ -53,10 +58,10 @@ App development
Inner parts of an app:
* :doc:`main`
-* :doc:`classloader`
* :doc:`container`
* :doc:`routes`
* :doc:`info`
+* :doc:`classloader`
Controllers
-----------
@@ -73,7 +78,7 @@ Create database tables and run Sql queries:
Templates
---------
-HTML and inclusion of JavaScript and CSS
+Create the basic HTML markup of your app:
* :doc:`templates`
@@ -99,14 +104,24 @@ Listen on events like user creation and execute code:
Background Jobs
---------------
Periodically run code in the background:
-* :doc:`:`backgroundjobs`
+* :doc:`backgroundjobs`
-Testing
--------
-Write automated tests to ensure stability and ease maintenance:
+Filesystem
+----------
+Accessing the filesystem:
-* :doc:`testing`
+* :doc:`filesystem`
+
+Users
+-----
+Creating, deleting, updating, searching, login and logout:
+
+* :doc:`users`
+
+Translation
+-----------
+* :doc:`l10n`
Creating a RESTful API
----------------------
@@ -114,8 +129,21 @@ How to create an API that other apps can connect to:
* :doc:`api`
-API Documentation
------------------
+Backends
+--------
+Plug into ownCloud user management or filesystem:
+
+* :doc:`userbackend`
+* :doc:`filesystembackend`
+
+Testing
+-------
+Write automated tests to ensure stability and ease maintenance:
+
+* :doc:`testing`
+
+PHPDoc Class Documentation
+--------------------------
ownCloud class and function documentation:
* `ownCloud App API <http://api.owncloud.org/namespaces/OCP.html>`_
\ No newline at end of file
diff --git a/developer_manual/app/app/info.rst b/developer_manual/app/info.rst
similarity index 59%
rename from developer_manual/app/app/info.rst
rename to developer_manual/app/info.rst
index 5497026..c6958d2 100644
--- a/developer_manual/app/app/info.rst
+++ b/developer_manual/app/info.rst
@@ -1,7 +1,7 @@
App Metadata
============
-.. sectionauthor:: Bernhard Posselt <nukeawhale at gmail.com>
+.. sectionauthor:: Bernhard Posselt <dev at bernhard-posselt.com>
The :file:`appinfo/info.xml` contains metadata about the app:
@@ -12,34 +12,21 @@ The :file:`appinfo/info.xml` contains metadata about the app:
<id>yourappname</id>
<name>Your App</name>
<description>Your App description</description>
- <version>1.0</version>
+ <version>0.0.1</version>
<licence>AGPL</licence>
<author>Your Name</author>
- <require>5</require>
+ <require>7</require>
<types>
<type>filesystem</type>
</types>
- <remote>
- <file id="caldav">appinfo/caldav.php</file>
- </remote>
-
<documentation>
<user>http://doc.owncloud.org</user>
<admin>http://doc.owncloud.org</admin>
</documentation>
<website>http://www.owncloud.org</website>
-
- <public>
- <file id="caldav">appinfo/caldav.php</file>
- </public>
-
- <standalone />
-
- <default_enable />
- <shipped>true</shipped>
</info>
id
@@ -87,22 +74,6 @@ ownCloud allows to specify four kind of "types". Currently supported "types":
* **logging**: apps which implement a logging system
-public
-------
-Used to provide a public interface (requires no login) for the app. The id is appended to the URL **/owncloud/index.php/public**. Example with id set to 'calendar'::
-
- /owncloud/index.php/public/calendar
-
-Also take a look at :doc:`externalapi`.
-
-remote
-------
-Same as public but requires login. The id is appended to the URL **/owncloud/index.php/remote**. Example with id set to 'calendar'::
-
- /owncloud/index.php/remote/calendar
-
-Also take a look at :doc:`externalapi`.
-
documentation
-------------
link to 'admin' and 'user' documentation
@@ -111,16 +82,3 @@ website
-------
link to project webpage
-standalone
-----------
-Can be set to true to indicate that this app is a webapp. This can be used to tell GNOME Web for instance to treat this like a native application.
-
-default_enable
---------------
-**Core apps only**: Used to tell ownCloud to enable them after the installation.
-
-shipped
--------
-**Core apps only**: Used to tell ownCloud that the app is in the standard release.
-
-Please note that if this attribute is set to *FALSE* or not set at all, every time you disable the application, all the files of the application itself will be *REMOVED* from the server!
diff --git a/developer_manual/app/intro/index.rst b/developer_manual/app/intro/index.rst
deleted file mode 100644
index efdd01a..0000000
--- a/developer_manual/app/intro/index.rst
+++ /dev/null
@@ -1,8 +0,0 @@
-======================
-App Development Intro
-======================
-
-.. toctree::
- :maxdepth: 1
-
- createapp
diff --git a/developer_manual/app/js.rst b/developer_manual/app/js.rst
new file mode 100644
index 0000000..0c88d11
--- /dev/null
+++ b/developer_manual/app/js.rst
@@ -0,0 +1,4 @@
+JavaScript
+==========
+
+.. sectionauthor:: Bernhard Posselt <dev at bernhard-posselt.com>
\ No newline at end of file
diff --git a/developer_manual/app/l10n.rst b/developer_manual/app/l10n.rst
new file mode 100644
index 0000000..d0eac3e
--- /dev/null
+++ b/developer_manual/app/l10n.rst
@@ -0,0 +1,4 @@
+Translation
+===========
+
+.. sectionauthor:: Bernhard Posselt <dev at bernhard-posselt.com>
\ No newline at end of file
diff --git a/developer_manual/app/main.rst b/developer_manual/app/main.rst
index d6e1d8d..bcf8ab0 100644
--- a/developer_manual/app/main.rst
+++ b/developer_manual/app/main.rst
@@ -1,9 +1,9 @@
-Main
-====
+Navigation and Pre-App configuration
+====================================
.. sectionauthor:: Bernhard Posselt <dev at bernhard-posselt.com>
-The file :file:`appinfo/app.php` is the first file that is loaded and executed in ownCloud. Depending on the purpose of the app it usually just contains the ;:doc:`navigation` setup, :doc:`backgroundjobs` and :doc:`hooks` registration. This is how an example :file:`appinfo/app.php` could look like:
+The :file:`appinfo/app.php` is the first file that is loaded and executed in ownCloud. Depending on the purpose of the app it usually just contains the navigation setup, and maybe :doc:`backgroundjobs` and :doc:`hooks` registrations. This is how an example :file:`appinfo/app.php` could look like:
.. code-block:: php
@@ -37,7 +37,7 @@ The file :file:`appinfo/app.php` is the first file that is loaded and executed i
\OCP\Util::connectHook('OC_User', 'pre_deleteUser', 'OCA\MyApp\Hooks\User', 'deleteUser');
-It is also possible to include :doc:`javascript` or :doc:`css` for other apps by placing the **loadScript** or **loadStyle** functions inside this file.
+It is also possible to include :doc:`javascript` or :doc:`css` for other apps by placing the **addScript** or **addStyle** functions inside this file.
.. code-block:: php
diff --git a/developer_manual/app/middleware.rst b/developer_manual/app/middleware.rst
new file mode 100644
index 0000000..ef74d23
--- /dev/null
+++ b/developer_manual/app/middleware.rst
@@ -0,0 +1,4 @@
+Middleware
+==========
+
+.. sectionauthor:: Bernhard Posselt <dev at bernhard-posselt.com>
\ No newline at end of file
diff --git a/developer_manual/app/routes.rst b/developer_manual/app/routes.rst
new file mode 100644
index 0000000..e4c9d37
--- /dev/null
+++ b/developer_manual/app/routes.rst
@@ -0,0 +1,4 @@
+Routing
+=======
+
+.. sectionauthor:: Bernhard Posselt <dev at bernhard-posselt.com>
\ No newline at end of file
diff --git a/developer_manual/app/app/schema.rst b/developer_manual/app/schema.rst
similarity index 88%
rename from developer_manual/app/app/schema.rst
rename to developer_manual/app/schema.rst
index c36270d..eea8377 100644
--- a/developer_manual/app/app/schema.rst
+++ b/developer_manual/app/schema.rst
@@ -1,9 +1,9 @@
Database Schema
===============
-.. sectionauthor:: Bernhard Posselt <nukeawhale at gmail.com>
+.. sectionauthor:: Bernhard Posselt <dev at bernhard-posselt.com>
-ownCloud uses a database abstraction layer on top of either MDB2 or PDO, depending on the availability of PDO on the server.
+ownCloud uses a database abstraction layer on top of either PDO, depending on the availability of PDO on the server.
The database schema is inside :file:`appinfo/database.xml` in MDB2's `XML scheme notation <http://www.wiltonhotel.com/_ext/pear/docs/MDB2/docs/xml_schema_documentation.html>`_ where the placeholders \*dbprefix* (\*PREFIX* in your SQL) and \*dbname* can be used for the configured database table prefix and database name.
diff --git a/developer_manual/app/app/templates.rst b/developer_manual/app/templates.rst
similarity index 92%
rename from developer_manual/app/app/templates.rst
rename to developer_manual/app/templates.rst
index a56158e..a46ca2f 100644
--- a/developer_manual/app/app/templates.rst
+++ b/developer_manual/app/templates.rst
@@ -1,7 +1,7 @@
Templates
=========
-.. sectionauthor:: Bernhard Posselt <nukeawhale at gmail.com>
+.. sectionauthor:: Bernhard Posselt <dev at bernhard-posselt.com>
ownCloud provides its own templating system.
diff --git a/developer_manual/app/testing.rst b/developer_manual/app/testing.rst
new file mode 100644
index 0000000..c3fcd96
--- /dev/null
+++ b/developer_manual/app/testing.rst
@@ -0,0 +1,4 @@
+Testing
+=======
+
+.. sectionauthor:: Bernhard Posselt <dev at bernhard-posselt.com>
\ No newline at end of file
diff --git a/developer_manual/app/userbackend.rst b/developer_manual/app/userbackend.rst
new file mode 100644
index 0000000..2ea1611
--- /dev/null
+++ b/developer_manual/app/userbackend.rst
@@ -0,0 +1,4 @@
+User backends
+=============
+
+.. sectionauthor:: Bernhard Posselt <dev at bernhard-posselt.com>
\ No newline at end of file
diff --git a/developer_manual/app/users.rst b/developer_manual/app/users.rst
new file mode 100644
index 0000000..a729cef
--- /dev/null
+++ b/developer_manual/app/users.rst
@@ -0,0 +1,4 @@
+User & Session Management
+=========================
+
+.. sectionauthor:: Bernhard Posselt <dev at bernhard-posselt.com>
\ No newline at end of file
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-doc.git
More information about the Pkg-owncloud-commits
mailing list