public function setUp() { $this->container = new Container(); $this->pushMessageMapper = $this->container->query('PushMessageMapper'); $this->userOnlineMapper = $this->container->query('UserOnlineMapper'); $this->userMapper = $this->container->query('UserMapper'); }
public function setUp() { $this->container = new Container(); $this->conversationMapper = $this->container->query('ConversationMapper'); $this->userMapper = $this->container->query('UserMapper'); }
<?php namespace OCA\Chat\Admin; use OCA\Chat\App\Container; $container = new Container(); $response = $container->query('AdminController')->index(); return $response->render();
<?php /** * Copyright (c) 2014, Tobia De Koninck hey--at--ledfan.be * This file is licensed under the AGPL version 3 or later. * See the COPYING file. */ namespace OCA\Chat; use OCA\Chat\App\Chat; use OCA\Chat\App\Container; use OCP\Util; use OCP\App; $container = new Container(); $container->query('OCP\\INavigationManager')->add(function () { return array('id' => 'chat', 'order' => 10, 'href' => Util::linkToRoute('chat.app.index'), 'icon' => Util::imagePath('chat', 'chat.png'), 'name' => Util::getL10n('chat')->t('Chat')); }); $container->query('Chat')->registerBackend($container->query('OCH')); $container->query('Chat')->registerBackend($container->query('XMPP')); App::registerAdmin('chat', 'lib/admin'); // When the "Integrated View" is loaded, include the CSS and JS code: if ($container->query('Chat')->viewType === Chat::INTEGRATED) { if (\OCP\User::isLoggedIn()) { Util::addStyle('chat', '../vendor/emojione/assets/sprites/emojione.sprites'); Util::addStyle('chat', '../vendor/emojione/assets/css/emojione.min'); Util::addScript('chat', '../vendor/all.min'); Util::addScript('chat', 'integrated.min'); Util::addStyle('chat', 'integrated.min'); if (defined('DEBUG') && DEBUG) { Util::addScript('chat', '../vendor/angular-mocks/angular-mocks'); }
<?php use OCA\Chat\App\Container; $container = new Container(); // Disable the XMPP backend by default when there is no entry in the DB which enables it // you can manually enable it (https://github.com/owncloud/chat/wiki/FAQ#enabling-a-backend) $container->query('OCP\\IConfig')->setAppValue('chat', 'backend_xmpp_enabled', false);