Browse Source

fix annotations & copyright headers

tags/v11.0RC2
Thomas Citharel 7 years ago
parent
commit
dcc23114e9
No account linked to committer's email address

+ 2
- 84
apps/dav/lib/AppInfo/Application.php View File

@@ -37,90 +37,8 @@ class Application extends App {
/**
* Application constructor.
*/
public function __construct (array $urlParams=array()) {
parent::__construct('dav', $urlParams);

$container = $this->getContainer();
$container->registerService('ContactsManager', function($c) {
/** @var IAppContainer $c */
return new ContactsManager(
$c->query('CardDavBackend')
);
});

$container->registerService('HookManager', function($c) {
/** @var IAppContainer $c */
return new HookManager(
$c->getServer()->getUserManager(),
$c->query('SyncService'),
$c->query('CalDavBackend'),
$c->query('CardDavBackend')
);
});

$container->registerService('SyncService', function($c) {
/** @var IAppContainer $c */
return new SyncService(
$c->query('CardDavBackend'),
$c->getServer()->getUserManager(),
$c->getServer()->getLogger()
);
});

$container->registerService('CardDavBackend', function($c) {
/** @var IAppContainer $c */
$db = $c->getServer()->getDatabaseConnection();
$dispatcher = $c->getServer()->getEventDispatcher();
$principal = new Principal(
$c->getServer()->getUserManager(),
$c->getServer()->getGroupManager()
);
return new CardDavBackend($db, $principal, $c->getServer()->getUserManager(), $dispatcher);
});

$container->registerService('CalDavBackend', function($c) {
/** @var IAppContainer $c */
$db = $c->getServer()->getDatabaseConnection();
$userManager = $c->getServer()->getUserManager();
$config = $c->getServer()->getConfig();
$random = $c->getServer()->getSecureRandom();

$principal = new Principal(
$c->getServer()->getUserManager(),
$c->getServer()->getGroupManager()
);
return new CalDavBackend($db, $principal, $userManager, $config, $random);
});

$container->registerService('BirthdayService', function($c) {
/** @var IAppContainer $c */
$g = new GroupPrincipalBackend(
$c->getServer()->getGroupManager()
);
return new BirthdayService(
$c->query('CalDavBackend'),
$c->query('CardDavBackend'),
$g
);
});

$container->registerService('OCA\DAV\Migration\Classification', function ($c) {
/** @var IAppContainer $c */
return new Classification(
$c->query('CalDavBackend'),
$c->getServer()->getUserManager()
);
});

$container->registerService('OCA\DAV\Migration\GenerateBirthdays', function ($c) {
/** @var IAppContainer $c */
/** @var BirthdayService $b */
$b = $c->query('BirthdayService');
return new GenerateBirthdays(
$b,
$c->getServer()->getUserManager()
);
});
public function __construct() {
parent::__construct('dav');
}

/**

+ 20
- 2
apps/dav/lib/CalDAV/Publishing/PublishPlugin.php View File

@@ -1,5 +1,23 @@
<?php

/**
* @author Thomas Citharel <tcit@tcit.fr>
*
* @copyright Copyright (c) 2016 Thomas Citharel <tcit@tcit.fr>
* @license GNU AGPL version 3 or any later version
*
* This code is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License, version 3,
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
namespace OCA\DAV\CalDAV\Publishing;

use Sabre\DAV\PropFind;
@@ -116,7 +134,7 @@ class PublishPlugin extends ServerPlugin {
* @param RequestInterface $request
* @param ResponseInterface $response
*
* @return null|bool
* @return void|bool
*/
public function httpPost(RequestInterface $request, ResponseInterface $response) {
$path = $request->getPath();

+ 19
- 1
apps/dav/lib/CalDAV/Publishing/Xml/Publisher.php View File

@@ -1,5 +1,23 @@
<?php

/**
* @author Thomas Citharel <tcit@tcit.fr>
*
* @copyright Copyright (c) 2016 Thomas Citharel <tcit@tcit.fr>
* @license GNU AGPL version 3 or any later version
*
* This code is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License, version 3,
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
namespace OCA\DAV\CalDAV\Publishing\Xml;

use OCA\DAV\CalDAV\Publishing\PublishPlugin as Plugin;

+ 0
- 3
apps/dav/lib/DAV/PublicAuth.php View File

@@ -29,9 +29,6 @@ class PublicAuth implements BackendInterface {
/** @var string[] */
private $publicURLs;

/**
* @param string[] $publicURLs
*/
public function __construct() {
$this->publicURLs = [
'public-calendars',

Loading…
Cancel
Save