fix annotations & copyright headers

This commit is contained in:
Thomas Citharel 2016-09-23 18:20:04 +02:00 committed by Lukas Reschke
parent 9c75b00850
commit dcc23114e9
No known key found for this signature in database
GPG Key ID: B9F6980CF6E759B1
4 changed files with 41 additions and 90 deletions

View File

@ -37,90 +37,8 @@ class Application extends App {
/** /**
* Application constructor. * Application constructor.
*/ */
public function __construct (array $urlParams=array()) { public function __construct() {
parent::__construct('dav', $urlParams); parent::__construct('dav');
$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()
);
});
} }
/** /**

View File

@ -1,5 +1,23 @@
<?php <?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; namespace OCA\DAV\CalDAV\Publishing;
use Sabre\DAV\PropFind; use Sabre\DAV\PropFind;
@ -116,7 +134,7 @@ class PublishPlugin extends ServerPlugin {
* @param RequestInterface $request * @param RequestInterface $request
* @param ResponseInterface $response * @param ResponseInterface $response
* *
* @return null|bool * @return void|bool
*/ */
public function httpPost(RequestInterface $request, ResponseInterface $response) { public function httpPost(RequestInterface $request, ResponseInterface $response) {
$path = $request->getPath(); $path = $request->getPath();

View File

@ -1,5 +1,23 @@
<?php <?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; namespace OCA\DAV\CalDAV\Publishing\Xml;
use OCA\DAV\CalDAV\Publishing\PublishPlugin as Plugin; use OCA\DAV\CalDAV\Publishing\PublishPlugin as Plugin;

View File

@ -29,9 +29,6 @@ class PublicAuth implements BackendInterface {
/** @var string[] */ /** @var string[] */
private $publicURLs; private $publicURLs;
/**
* @param string[] $publicURLs
*/
public function __construct() { public function __construct() {
$this->publicURLs = [ $this->publicURLs = [
'public-calendars', 'public-calendars',