1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2024-12-01 13:24:10 +01:00
OwncloudContactsOfficial/lib/dicontainer.php

42 lines
1.0 KiB
PHP
Raw Normal View History

2013-04-18 01:12:04 +02:00
<?php
/**
* @author Thomas Tanghus
* Copyright (c) 2013 Thomas Tanghus (thomas@tanghus.net)
* This file is licensed under the Affero General Public License version 3 or
* later.
* See the COPYING-README file.
*/
namespace OCA\Contacts;
use OCA\AppFramework\DependencyInjection\DIContainer as BaseContainer;
use OCA\Contacts\Controller\AddressBookController;
use OCA\Contacts\Controller\GroupController;
use OCA\Contacts\Controller\ContactController;
2013-04-18 01:12:04 +02:00
class DIContainer extends BaseContainer {
/**
* Define your dependencies in here
*/
public function __construct(){
// tell parent container about the app name
parent::__construct('contacts');
/**
* CONTROLLERS
*/
$this['AddressBookController'] = $this->share(function($c){
return new AddressBookController($c['API'], $c['Request']);
});
$this['GroupController'] = $this->share(function($c){
return new GroupController($c['API'], $c['Request']);
});
$this['ContactController'] = $this->share(function($c){
return new ContactController($c['API'], $c['Request']);
});
2013-04-18 01:12:04 +02:00
}
}