Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/documentation.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Wolf <github@christianwolf.email>2022-11-03 17:43:40 +0300
committerChristian Wolf <github@christianwolf.email>2022-11-03 17:43:40 +0300
commite0afb73e7c44b8062fe5da69e5b2c58d00af1e75 (patch)
tree88efa3af33601491c7cc8ff16e4d11b396ce57b8
parent1053dfadf7d91fed32b6784d69857a8f2db35f53 (diff)
Removed wrong capitalization and few bugs in Sphinx build
Signed-off-by: Christian Wolf <github@christianwolf.email>
-rw-r--r--developer_manual/basics/controllers.rst4
-rw-r--r--developer_manual/basics/dependency_injection.rst25
-rw-r--r--developer_manual/basics/storage/configuration.rst2
3 files changed, 16 insertions, 15 deletions
diff --git a/developer_manual/basics/controllers.rst b/developer_manual/basics/controllers.rst
index 59cdce03a..f7f30a992 100644
--- a/developer_manual/basics/controllers.rst
+++ b/developer_manual/basics/controllers.rst
@@ -238,8 +238,8 @@ Then session variables can be accessed like this:
private ISession $session;
- public function __construct($AppName, IRequest $request, ISession $session) {
- parent::__construct($AppName, $request);
+ public function __construct($appName, IRequest $request, ISession $session) {
+ parent::__construct($appName, $request);
$this->session = $session;
}
diff --git a/developer_manual/basics/dependency_injection.rst b/developer_manual/basics/dependency_injection.rst
index 0dcf04b50..59d2ec158 100644
--- a/developer_manual/basics/dependency_injection.rst
+++ b/developer_manual/basics/dependency_injection.rst
@@ -104,7 +104,7 @@ use the **registerService** method on the container object:
*/
$container->registerService(AuthorController::class, function(ContainerInterface $c): AuthorController {
return new AuthorController(
- $c->get('AppName'),
+ $c->get('appName'),
$c->get(Request::class),
$c->get(AuthorService::class)
);
@@ -139,12 +139,12 @@ The container works in the following way:
* The matched route queries **AuthorController** service from the container::
return new AuthorController(
- $c->get('AppName'),
+ $c->get('appName'),
$c->get(Request::class),
$c->get(AuthorService::class)
);
-* The **AppName** is queried and returned from the base class
+* The **appName** is queried and returned from the base class
* The **Request** is queried and returned from the server container
* **AuthorService** is queried::
@@ -198,9 +198,9 @@ So basically the following is now possible:
public MyTestClass $class;
public string $appName;
- public function __construct(MyTestClass $class, string $AppName) {
+ public function __construct(MyTestClass $class, string $appName) {
$this->class = $class;
- $this->appName = $AppName;
+ $this->appName = $appName;
}
}
@@ -213,7 +213,7 @@ So basically the following is now possible:
$class2->appName === 'myname'; // true
$class2 === $app->getContainer()->get(MyTestClass2::class); // true
-.. note:: $AppName is resolved because the container registered a parameter under the key 'AppName' which will return the app id. The lookup is case sensitive so while $AppName will work correctly, using $appName as a constructor parameter will fail.
+.. note:: $appName is resolved because the container registered a parameter under the key 'appName' which will return the app id.
How does it affect the request lifecycle
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -252,8 +252,8 @@ The only thing that needs to be done to add a route and a controller method is n
use OCP\IRequest;
class PageController {
- public function __construct($AppName, IRequest $request) {
- parent::__construct($AppName, $request);
+ public function __construct($appName, IRequest $request) {
+ parent::__construct($appName, $request);
}
public function index() {
@@ -314,11 +314,12 @@ Parameters:
* **webRoot**: The path to the Nextcloud installation
Aliases:
-* **AppName**: resolves to ``AppName`` (deprecated)
-* **Request**: resolves to ``\OCP\\IRequest``
+
+* **AppName**: resolves to ``appName`` (deprecated)
+* **Request**: resolves to ``\OCP\IRequest``
* **ServerContainer**: resolves to ``\OCP\IServerContainer``
-* **UserId**: resolves to ``UserId`` (deprecated)
-* **WebRoot**: resolves to ``WebRoot`` (deprecated)
+* **UserId**: resolves to ``userId`` (deprecated)
+* **WebRoot**: resolves to ``webRoot`` (deprecated)
Types:
diff --git a/developer_manual/basics/storage/configuration.rst b/developer_manual/basics/storage/configuration.rst
index 1b619119c..afb26e856 100644
--- a/developer_manual/basics/storage/configuration.rst
+++ b/developer_manual/basics/storage/configuration.rst
@@ -30,7 +30,7 @@ The config that allows the app to set global, app and user settings can be injec
$container->registerService('AuthorService', function(IServerContainer $c): AuthorService {
return new AuthorService(
$c->get(IConfig::class),
- $c->get('AppName')
+ $c->get('appName')
);
});
}