[Pkg-owncloud-commits] [owncloud-doc] 57/270: use the server container for the database connection
David Prévot
taffit at moszumanska.debian.org
Thu Jul 31 03:53:01 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 b8e5247212aa51c7ff6043a0cf3d7529404958e9
Author: Bernhard Posselt <dev at bernhard-posselt.com>
Date: Sun May 11 16:10:22 2014 +0200
use the server container for the database connection
---
developer_manual/app/database.rst | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/developer_manual/app/database.rst b/developer_manual/app/database.rst
index 268dc84..009d509 100644
--- a/developer_manual/app/database.rst
+++ b/developer_manual/app/database.rst
@@ -27,7 +27,7 @@ The basic way to run a database query is to inject the **Db** service.
* Database Layer
*/
$container->registerService('AuthorDAO', function($c) {
- return new AuthorDAO($c->query('Db'));
+ return new AuthorDAO($c->query('ServerContainer')->getDb());
});
}
}
@@ -158,7 +158,7 @@ Mappers should be registered in the constructor to reuse them inside the applica
* Database Layer
*/
$container->registerService('AuthorMapper', function($c) {
- return new AuthorMapper($c->query('Db'));
+ return new AuthorMapper($c->query('ServerContainer')->getDb());
});
}
}
--
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