Allow to inject ISearchResult
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
b7e8ab97e7
commit
f5b143e318
|
@ -46,6 +46,7 @@ use OC\AppFramework\Middleware\Security\RateLimitingMiddleware;
|
||||||
use OC\AppFramework\Middleware\Security\SecurityMiddleware;
|
use OC\AppFramework\Middleware\Security\SecurityMiddleware;
|
||||||
use OC\AppFramework\Middleware\SessionMiddleware;
|
use OC\AppFramework\Middleware\SessionMiddleware;
|
||||||
use OC\AppFramework\Utility\SimpleContainer;
|
use OC\AppFramework\Utility\SimpleContainer;
|
||||||
|
use OC\Collaboration\Collaborators\SearchResult;
|
||||||
use OC\Core\Middleware\TwoFactorMiddleware;
|
use OC\Core\Middleware\TwoFactorMiddleware;
|
||||||
use OC\RichObjectStrings\Validator;
|
use OC\RichObjectStrings\Validator;
|
||||||
use OC\ServerContainer;
|
use OC\ServerContainer;
|
||||||
|
@ -53,6 +54,7 @@ use OCP\AppFramework\Http\IOutput;
|
||||||
use OCP\AppFramework\IAppContainer;
|
use OCP\AppFramework\IAppContainer;
|
||||||
use OCP\AppFramework\QueryException;
|
use OCP\AppFramework\QueryException;
|
||||||
use OCP\AppFramework\Utility\ITimeFactory;
|
use OCP\AppFramework\Utility\ITimeFactory;
|
||||||
|
use OCP\Collaboration\Collaborators\ISearchResult;
|
||||||
use OCP\Files\Folder;
|
use OCP\Files\Folder;
|
||||||
use OCP\Files\IAppData;
|
use OCP\Files\IAppData;
|
||||||
use OCP\GlobalScale\IConfig;
|
use OCP\GlobalScale\IConfig;
|
||||||
|
@ -62,7 +64,6 @@ use OCP\IRequest;
|
||||||
use OCP\IServerContainer;
|
use OCP\IServerContainer;
|
||||||
use OCP\IUserSession;
|
use OCP\IUserSession;
|
||||||
use OCP\RichObjectStrings\IValidator;
|
use OCP\RichObjectStrings\IValidator;
|
||||||
use OCP\Util;
|
|
||||||
use OCP\Encryption\IManager;
|
use OCP\Encryption\IManager;
|
||||||
use OCA\WorkflowEngine\Manager;
|
use OCA\WorkflowEngine\Manager;
|
||||||
|
|
||||||
|
@ -144,6 +145,8 @@ class DIContainer extends SimpleContainer implements IAppContainer {
|
||||||
return $c;
|
return $c;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$this->registerAlias(ISearchResult::class, SearchResult::class);
|
||||||
|
|
||||||
// commonly used attributes
|
// commonly used attributes
|
||||||
$this->registerService('UserId', function ($c) {
|
$this->registerService('UserId', function ($c) {
|
||||||
return $c->query(IUserSession::class)->getSession()->get('user_id');
|
return $c->query(IUserSession::class)->getSession()->get('user_id');
|
||||||
|
|
Loading…
Reference in New Issue