コード例 #1
0
 public static function postDeleteUser($parameters)
 {
     $app = new App('sipgate');
     $container = $app->getContainer();
     $logger = $container->query('OCP\\ILogger');
     $logger->warn('hello!');
 }
コード例 #2
0
ファイル: XmlTest.php プロジェクト: camilasan/popcornapp
 public function setUp()
 {
     parent::setUp();
     $app = new App('popcornapp');
     $this->container = $app->getContainer();
     //echo var_dump($userSession);
     $this->controller = new XML('Test', array('/data/Pictures/holiday1.jpg', '/data/Pictures/holiday2.jpg', '/data/Pictures/holiday3.jpg', '/data/Pictures/holiday4.jpg'), 1);
 }
コード例 #3
0
 public function setUp()
 {
     parent::setUp();
     $app = new App('popcornapp');
     $this->container = $app->getContainer();
     $this->request = $this->getMockBuilder('OCP\\IRequest')->getMock();
     //echo var_dump($userSession);
     $this->controller = new MltController('popcornapp', $this->request);
 }
コード例 #4
0
 public function setUp()
 {
     $app = new App('notes');
     $container = $app->getContainer();
     $container->registerService('UserId', function ($c) {
         return $this->userId;
     });
     $this->controller = $container->query('OCA\\Notes\\Controller\\NotesApiController');
     $this->fs = $container->query('OCP\\Files\\IRootFolder');
     $this->fs->newFolder($this->notesFolder);
 }
コード例 #5
0
 public function setUp()
 {
     parent::setUp();
     $app = new App('ownnotes');
     $container = $app->getContainer();
     // only replace the user id
     $container->registerService('UserId', function ($c) {
         return $this->userId;
     });
     $this->controller = $container->query('OCA\\OwnNotes\\Controller\\NoteController');
     $this->mapper = $container->query('OCA\\OwnNotes\\Db\\NoteMapper');
 }
コード例 #6
0
ファイル: base.php プロジェクト: pigulla/owncloud-sipgate
 public function __construct()
 {
     $app = new App('sipgate');
     $this->container = $app->getContainer();
     $this->appName = $this->container->query('AppName');
     $this->db = $this->container->query('OCP\\IDBConnection');
     $this->config = $this->container->query('OCP\\IConfig');
     $this->logger = $this->container->query('OCA\\Sipgate\\Service\\AppLogger');
     $this->appSettings = $this->container->query('OCA\\Sipgate\\Service\\AppSettings');
     $reflect = new \ReflectionClass($this);
     $logSuffix = mb_strtolower($reflect->getShortName());
     $this->logger->setSuffix($logSuffix);
     // Run every 15 Minutes
     $this->setInterval(15 * 60);
 }
コード例 #7
0
 public function setUp()
 {
     parent::setUp();
     $app = new App('files_sharing_ext');
     $this->container = $app->getContainer();
 }
コード例 #8
0
 public function setUp()
 {
     parent::setUp();
     $app = new App('config_history');
     $this->container = $app->getContainer();
 }
コード例 #9
0
ファイル: AppTest.php プロジェクト: ChristophWurst/recipe
 public function setUp()
 {
     parent::setUp();
     $app = new App('recipe');
     $this->container = $app->getContainer();
 }
コード例 #10
0
ファイル: AppTest.php プロジェクト: raceface2nd/owncollab
 public function setUp()
 {
     parent::setUp();
     $app = new App('owncollabcalendar');
     $this->container = $app->getContainer();
 }
コード例 #11
0
ファイル: AppTest.php プロジェクト: sken2/oc_gpstracks
 public function setUp()
 {
     parent::setUp();
     $app = new App('gpstracks');
     $this->container = $app->getContainer();
 }
コード例 #12
0
ファイル: AppTest.php プロジェクト: yheric455042/owncloud82
 public function setUp()
 {
     parent::setUp();
     $app = new App('ajax_event_dispatcher');
     $this->container = $app->getContainer();
 }
コード例 #13
0
<?php

/**
 * ownCloud - shared_session
 *
 * This file is licensed under the Affero General Public License version 3 or
 * later. See the COPYING file.
 *
 * @author Dauba <*****@*****.**>
 * @copyright Dauba 2016
 */
namespace OCA\Shared_Session\AppInfo;

use OCP\AppFramework\App;
use OCA\Shared_Session\DatabaseSessionHandler;
$app = new App('shared_session');
$serverContainer = $app->getContainer()->getServer();
$config = $serverContainer->getSystemConfig();
$handler = new DatabaseSessionHandler();
$handler->init($config->getValue("dbtype"), $config->getValue("dbhost"), $config->getValue("dbuser"), $config->getValue("dbpassword"), $config->getValue("dbname"));
$session_Est = session_set_save_handler($handler, true);
コード例 #14
0
ファイル: AppTest.php プロジェクト: twil/fileshtmlpreview
 public function setUp()
 {
     parent::setUp();
     $app = new App('fileshtmlpreview');
     $this->container = $app->getContainer();
 }
コード例 #15
0
ファイル: AppTest.php プロジェクト: mirekys/user_shib
 public function setUp()
 {
     parent::setUp();
     $app = new App('user_shib');
     $this->container = $app->getContainer();
 }
コード例 #16
0
 public function setUp()
 {
     parent::setUp();
     $app = new App('mail_external');
     $this->container = $app->getContainer();
 }
コード例 #17
0
 public function setUp()
 {
     parent::setUp();
     $app = new App('show_all_activity');
     $this->container = $app->getContainer();
 }
コード例 #18
0
ファイル: AppTest.php プロジェクト: jmeile/agreedisclaimer
 public function setUp()
 {
     parent::setUp();
     $app = new App('agreedisclaimer');
     $this->container = $app->getContainer();
 }
コード例 #19
0
ファイル: AppTest.php プロジェクト: yheric455042/owncloud82
 public function setUp()
 {
     parent::setUp();
     $app = new App('sharing_group');
     $this->container = $app->getContainer();
 }
コード例 #20
0
 public function setUp()
 {
     parent::setUp();
     $app = new App('activity_ext');
     $this->container = $app->getContainer();
 }
コード例 #21
0
 public function setUp()
 {
     parent::setUp();
     $app = new App('singlesignon');
     $this->container = $app->getContainer();
 }
コード例 #22
0
 public function setUp()
 {
     parent::setUp();
     $app = new App('popularitycontestserver');
     $this->container = $app->getContainer();
 }
コード例 #23
0
 public function setUp()
 {
     parent::setUp();
     $app = new App('shared_session');
     $this->container = $app->getContainer();
 }
コード例 #24
0
ファイル: AppTest.php プロジェクト: x7712611430/ownCloudapp
 public function setUp()
 {
     parent::setUp();
     $app = new App('files_external_aws');
     $this->container = $app->getContainer();
 }
コード例 #25
0
 public function setUp()
 {
     parent::setUp();
     $app = new App('user_status_validator');
     $this->container = $app->getContainer();
 }
コード例 #26
0
 /**
  * Called before executing all tests in a suite
  *
  * If the module is injected, you need to use _initialize()
  *
  * @param array $settings
  */
 public function _beforeSuite($settings = [])
 {
     $this->coreTestCase = new CoreTestCase();
     $app = new App('gallery-test-setup');
     $this->container = $app->getContainer();
     $this->server = $this->container->getServer();
     $this->rootFolder = $this->server->getRootFolder();
     $this->userManager = $this->server->getUserManager();
     /**
      * Logging hooks are missing at the moment, so we need to disable encryption
      *
      * @link https://github.com/owncloud/core/issues/18085#issuecomment-128093797
      */
     $this->server->getConfig()->setAppValue('core', 'encryption_enabled', 'no');
     // This is because the filesystem is not properly cleaned up sometimes
     $this->server->getAppManager()->disableApp('files_trashbin');
     $this->setPreviewProviders();
     $this->createTestSetup($this->userId, $this->userPassword);
     $this->createTestSetup($this->sharerUserId, $this->sharerPassword);
     $this->createShares();
 }
コード例 #27
0
<?php

/**
 * ownCloud - sipgate
 *
 * This file is licensed under the Affero General Public License version 3 or
 * later. See the COPYING file.
 *
 * @author Raphael Pigulla <*****@*****.**>
 * @copyright Raphael Pigulla 2015
 */
use OCP\AppFramework\App;
use OCA\Sipgate\Service\UserSettings;
$app = new App('sipgate');
$container = $app->getContainer();
/** @var OCP\IDateTimeZone $timeZone */
$timeZone = $container->query('OCP\\IDateTimeZone');
/** @var OCA\Sipgate\Service\UserSettings $userSettings */
$userSettings = $container->query('OCA\\Sipgate\\Service\\UserSettings');
$lastUpdated = $userSettings->getLastUpdated();
$lastUpdated->setTimezone($timeZone->getTimeZone());
$template = new \OCP\Template('sipgate', 'settings-personal');
$template->assign('username', $userSettings->getUsername());
$template->assign('password', $userSettings->getPassword());
$template->assign('retention', $userSettings->getRetention());
$template->assign('syncPeriod', $userSettings->getSyncPeriod());
$template->assign('localUris', implode(' ', $userSettings->getLocalURIs()));
$template->assign('defaultCountryCode', $userSettings->getDefaultCountryCode());
$template->assign('lastUpdated', $lastUpdated->format('Y-m-d H:i:s'));
$template->assign('SYNC_PERIOD_MIN', UserSettings::SYNC_PERIOD_MIN);
$template->assign('SYNC_PERIOD_MAX', UserSettings::SYNC_PERIOD_MAX);
コード例 #28
0
ファイル: AppTest.php プロジェクト: jbrew8/pilotlogbook
 public function setUp()
 {
     parent::setUp();
     $app = new App('pilotlogbook');
     $this->container = $app->getContainer();
 }