Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Nextcloud
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Nextcloud
Commits
07fcf143
Unverified
Commit
07fcf143
authored
4 years ago
by
Christoph Wurst
Browse files
Options
Downloads
Patches
Plain Diff
Migrate files to the PSR container
Signed-off-by:
Christoph Wurst
<
christoph@winzerhof-wurst.at
>
parent
f6daf17f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
apps/files/lib/AppInfo/Application.php
+22
-15
22 additions, 15 deletions
apps/files/lib/AppInfo/Application.php
with
22 additions
and
15 deletions
apps/files/lib/AppInfo/Application.php
+
22
−
15
View file @
07fcf143
...
...
@@ -47,17 +47,24 @@ use OCA\Files\Listener\LoadSidebarListener;
use
OCA\Files\Notification\Notifier
;
use
OCA\Files\Search\FilesSearchProvider
;
use
OCA\Files\Service\TagService
;
use
OCP\Activity\IManager
as
IActivityManager
;
use
OCP\AppFramework\App
;
use
OCP\AppFramework\Bootstrap\IBootContext
;
use
OCP\AppFramework\Bootstrap\IBootstrap
;
use
OCP\AppFramework\Bootstrap\IRegistrationContext
;
use
OCP\Collaboration\Resources\IProviderManager
;
use
OCP\ICon
tainer
;
use
OCP\ICon
fig
;
use
OCP\IL10N
;
use
OCP\IPreview
;
use
OCP\ISearch
;
use
OCP\IRequest
;
use
OCP\IServerContainer
;
use
OCP\ITagManager
;
use
OCP\IUserSession
;
use
OCP\Notification\IManager
;
use
OCP\Share\IManager
as
IShareManager
;
use
OCP\Util
;
use
Psr\Container\ContainerInterface
;
class
Application
extends
App
implements
IBootstrap
{
public
const
APP_ID
=
'files'
;
...
...
@@ -70,18 +77,18 @@ class Application extends App implements IBootstrap {
/**
* Controllers
*/
$context
->
registerService
(
'APIController'
,
function
(
I
Container
$c
)
{
$context
->
registerService
(
'APIController'
,
function
(
Container
Interface
$c
)
{
/** @var IServerContainer $server */
$server
=
$c
->
query
(
IServerContainer
::
class
);
$server
=
$c
->
get
(
IServerContainer
::
class
);
return
new
ApiController
(
$c
->
query
(
'AppName'
),
$c
->
query
(
'Request'
),
$
server
->
getUserSession
(
),
$c
->
query
(
'
TagService
'
),
$
server
->
getPreview
Manager
(
),
$
server
->
getShareManager
(
),
$
server
->
getConfig
(
),
$c
->
get
(
'AppName'
),
$c
->
get
(
IRequest
::
class
),
$
c
->
get
(
I
UserSession
::
class
),
$c
->
get
(
TagService
::
class
),
$
c
->
get
(
I
Preview
::
class
),
$
c
->
get
(
I
ShareManager
::
class
),
$
c
->
get
(
I
Config
::
class
),
$server
->
getUserFolder
()
);
});
...
...
@@ -89,14 +96,14 @@ class Application extends App implements IBootstrap {
/**
* Services
*/
$context
->
registerService
(
'TagService'
,
function
(
I
Container
$c
)
{
$context
->
registerService
(
'TagService'
,
function
(
Container
Interface
$c
)
{
/** @var IServerContainer $server */
$server
=
$c
->
query
(
IServerContainer
::
class
);
$server
=
$c
->
get
(
IServerContainer
::
class
);
return
new
TagService
(
$
server
->
getUserSession
(
),
$
server
->
getActivityManager
(
),
$
server
->
getTagManager
(
)
->
load
(
self
::
APP_ID
),
$
c
->
get
(
I
UserSession
::
class
),
$
c
->
get
(
I
ActivityManager
::
class
),
$
c
->
get
(
I
TagManager
::
class
)
->
load
(
self
::
APP_ID
),
$server
->
getUserFolder
(),
$server
->
getEventDispatcher
()
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment