[Pkg-owncloud-commits] [owncloud-doc] 159/270: fix build warnings, fix docs to not use the request from core that does not contain the url parameters owncloud/core#8827
David Prévot
taffit at moszumanska.debian.org
Thu Jul 31 03:53:16 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 3464678391fe760739118d33e7608357f8042db3
Author: Bernhard Posselt <dev at bernhard-posselt.com>
Date: Thu Jun 5 18:08:30 2014 +0200
fix build warnings, fix docs to not use the request from core that does not contain the url parameters owncloud/core#8827
---
developer_manual/app/container.rst | 12 ++++++------
developer_manual/app/controllers.rst | 2 +-
developer_manual/app/info.rst | 8 ++++----
developer_manual/app/routes.rst | 16 ++++++++--------
developer_manual/core/ocs-share-api.rst | 9 +++++----
developer_manual/core/theming.rst | 5 +++--
6 files changed, 27 insertions(+), 25 deletions(-)
diff --git a/developer_manual/app/container.rst b/developer_manual/app/container.rst
index 7d64a2d..2553292 100644
--- a/developer_manual/app/container.rst
+++ b/developer_manual/app/container.rst
@@ -23,7 +23,7 @@ Dependency Injection sounds pretty complicated but it just means: Don't new depe
class AuthorMapper {
private $db;
-
+
public function __construct() {
$this->db = new Db();
}
@@ -40,7 +40,7 @@ would turn into this by using Dependency Injection:
class AuthorMapper {
private $db;
-
+
public function __construct($db) {
$this->db = $db;
}
@@ -50,7 +50,7 @@ would turn into this by using Dependency Injection:
Using a container
=================
-Passing dependencies into the constructor rather than newing them in the constructor has the following drawback: Every line in the source code where **new AuthorMapper** is being used has to be changed, once a new constructor argument is being added to it.
+Passing dependencies into the constructor rather than newing them in the constructor has the following drawback: Every line in the source code where **new AuthorMapper** is being used has to be changed, once a new constructor argument is being added to it.
The solution for this particular problem is to limit the **new AuthorMapper** to one file, the container. The container contains all the factories for creating these objects and is configured in :file:`appinfo/application.php`.
@@ -86,7 +86,7 @@ To add the app's classes simply open the :file:`appinfo/application.php` use the
$container->registerService('AuthorController', function($c){
return new AuthorController(
$c->query('AppName'),
- $c->query('ServerContainer')->getRequest(),
+ $c->query('Request'),
$c->query('AuthorService')
);
});
@@ -118,10 +118,10 @@ The container works in the following way:
* :doc:`A request comes in and is matched against a route <request>` (for the AuthorController in this case)
* The matched route queries **AuthorController** service form the container::
-
+
return new AuthorController(
$c->query('AppName'),
- $c->query('ServerContainer')->getRequest(),
+ $c->query('Request'),
$c->query('AuthorService')
);
diff --git a/developer_manual/app/controllers.rst b/developer_manual/app/controllers.rst
index 286e793..d266c3c 100644
--- a/developer_manual/app/controllers.rst
+++ b/developer_manual/app/controllers.rst
@@ -52,7 +52,7 @@ To connect a controller and a route the controller has to be registered in the :
$container->registerService('AuthorApiController', function($c) {
return new AuthorApiController(
$c->query('AppName'),
- $c->query('ServerContainer')->getRequest()
+ $c->query('Request')
);
});
}
diff --git a/developer_manual/app/info.rst b/developer_manual/app/info.rst
index d00c207..5165ec4 100644
--- a/developer_manual/app/info.rst
+++ b/developer_manual/app/info.rst
@@ -33,12 +33,12 @@ The :file:`appinfo/info.xml` contains metadata about the app:
<!-- deprecated, just for reference -->
<public>
<file id="caldav">appinfo/caldav.php</file>
- </public>
+ </public>
<remote>
<file id="caldav">appinfo/caldav.php</file>
</remote>
-
+
<standalone />
<default_enable />
@@ -75,7 +75,7 @@ author
**Required**: The name of the app author or authors.
requiremin
--------
+----------
**Required**: The minimal version of ownCloud.
types
@@ -99,7 +99,7 @@ website
link to project webpage
Deprecated
-===========
+==========
The following sections are just listed for reference and should not be used because
diff --git a/developer_manual/app/routes.rst b/developer_manual/app/routes.rst
index 7a8083c..8adfd61 100644
--- a/developer_manual/app/routes.rst
+++ b/developer_manual/app/routes.rst
@@ -46,8 +46,8 @@ The route array contains the following parts:
*/
$container->registerService('PageController', function($c) {
return new PageController(
- $c->query('AppName'),
- $c->query('ServerContainer')->getRequest()
+ $c->query('AppName'),
+ $c->query('Request')
);
});
}
@@ -86,13 +86,13 @@ Matching suburls
Sometimes its needed to match more than one URL fragment. An example would be to match a request for all URLs that start with **OPTIONS /index.php/apps/myapp/api**. To do this, use the **requirements** parameter in your route which is an array containing pairs of **'key' => 'regex'**:
.. code-block:: php
-
+
<?php
// Request: OPTIONS /index.php/apps/myapp/api/my/route
// appinfo/routes.php
- array('name' => 'author_api#cors', 'url' => '/api/{path}', 'verb' => 'OPTIONS'),
+ array('name' => 'author_api#cors', 'url' => '/api/{path}', 'verb' => 'OPTIONS'),
'requirements' => array('path' => '.+')),
// controller/authorapicontroller.php
@@ -144,7 +144,7 @@ can be abbreviated by using the **resources** key:
$application->registerRoutes($this, array(
'resources' => array(
array('authors' => array('url' => '/authors'))
- ),
+ ),
'routes' => array(
// your other routes here
)
@@ -176,8 +176,8 @@ Sometimes its useful to turn a route into a URL to make the code independent fro
*/
$container->registerService('PageController', function($c) {
return new PageController(
- $c->query('AppName'),
- $c->query('ServerContainer')->getRequest(),
+ $c->query('AppName'),
+ $c->query('Request'),
// inject the URLGenerator into the page controller
$c->query('ServerContainer')->getURLGenerator()
@@ -203,7 +203,7 @@ Inside the PageController the URL generator can now be used to generate an URL f
private $urlGenerator;
- public function __construct($appName, IRequest $request,
+ public function __construct($appName, IRequest $request,
IURLGenerator $urlGenerator) {
parent::__construct($appName, $request);
$this->urlGenerator = $urlGenerator;
diff --git a/developer_manual/core/ocs-share-api.rst b/developer_manual/core/ocs-share-api.rst
index 4f97541..bc5ff4f 100644
--- a/developer_manual/core/ocs-share-api.rst
+++ b/developer_manual/core/ocs-share-api.rst
@@ -5,7 +5,7 @@ The OCS Share API allows you to access the sharing API from outside over
pre-defined OCS calls.
The base URL for all calls to the share API is: *<owncloud_base_url>/ocs/v1.php/apps/files_sharing/api/v1*
-
+
Get All Shares
--------------
@@ -68,7 +68,7 @@ Create a new Share
Share a file/folder with a user/group or as public link.
* Syntax: /shares
-* Method: POST
+* Method: POST
* POST Arguments: path - (string) path to the file/folder which should be shared
* POST Arguments: shareType - (int) '0' = user; '1' = group; '3' = public link
@@ -115,8 +115,9 @@ Update a given share. Only one value can be updated per request.
* Arguments: share_id - (int) share ID
* PUT Arguments: permissions - (int) update permissions (see "Create share" above)
* PUT Arguments: password - (string) updated password for public link Share
-* PUT Arguments: publicUpload - (boolean) enable (true) /disable (false) public upload for public shares
-Note that only one of "password" or "publicUpload" can be specified at once.
+* PUT Arguments: publicUpload - (boolean) enable (true) /disable (false) public upload for public shares.
+
+.. note:: Only one of "password" or "publicUpload" can be specified at once.
Statuscodes:
diff --git a/developer_manual/core/theming.rst b/developer_manual/core/theming.rst
index 68918ac..fc5a76f 100644
--- a/developer_manual/core/theming.rst
+++ b/developer_manual/core/theming.rst
@@ -6,6 +6,7 @@ Themes can relate to the following topics of owncloud:
* Theming the web-frontend
* Theming the owncloud Desktop client
+
This documentation contains only the Web-frontend adaptations so far.
Getting started
@@ -83,10 +84,10 @@ changing the default colours
With a web-developer tool like Mozilla-Inspector, you also get easily displayed the color of the background you clicked on.
On the top of the login page you can see a case- distinguished setting for different browsers:
-.. code-block::
+.. code-block:: css
/* HEADERS */
- ...
+ ...
background: #1d2d42; /* Old browsers */
background: -moz-linear-gradient(top, #33537a 0%, #1d2d42 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#F1B3A4), color-stop(100%,#1d2d42)); /* Chrome,Safari4+ */
--
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