remove IDb interface from core class usage
This commit is contained in:
parent
c62eb9d652
commit
59bbf27253
|
@ -77,7 +77,7 @@ class Server extends SimpleContainer implements IServerContainer {
|
|||
return new PreviewManager();
|
||||
});
|
||||
$this->registerService('TagMapper', function(Server $c) {
|
||||
return new TagMapper($c->getDb());
|
||||
return new TagMapper($c->getDatabaseConnection());
|
||||
});
|
||||
$this->registerService('TagManager', function (Server $c) {
|
||||
$tagMapper = $c->query('TagMapper');
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace OC\Tagging;
|
|||
|
||||
use \OCP\AppFramework\Db\Mapper,
|
||||
\OCP\AppFramework\Db\DoesNotExistException,
|
||||
\OCP\IDb;
|
||||
\OCP\IDBConnection;
|
||||
|
||||
/**
|
||||
* Mapper for Tag entity
|
||||
|
@ -32,9 +32,9 @@ class TagMapper extends Mapper {
|
|||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param IDb $db Instance of the Db abstraction layer.
|
||||
* @param IDBConnection $db Instance of the Db abstraction layer.
|
||||
*/
|
||||
public function __construct(IDb $db) {
|
||||
public function __construct(IDBConnection $db) {
|
||||
parent::__construct($db, 'vcategory', 'OC\Tagging\Tag');
|
||||
}
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ class Test_Tags extends \Test\TestCase {
|
|||
->will($this->returnValue($this->user));
|
||||
|
||||
$this->objectType = $this->getUniqueID('type_');
|
||||
$this->tagMapper = new OC\Tagging\TagMapper(\OC::$server->getDb());
|
||||
$this->tagMapper = new OC\Tagging\TagMapper(\OC::$server->getDatabaseConnection());
|
||||
$this->tagMgr = new OC\TagManager($this->tagMapper, $this->userSession);
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue