public static function deleteUser($params) { $userId = $params['uid']; $app = new Application(); $container = $app->getContainer(); // order is important! $container->query(ItemService::class)->deleteUser($userId); $container->query(FeedService::class)->deleteUser($userId); $container->query(FolderService::class)->deleteUser($userId); }
protected function setUp() { $app = new Application(); $this->container = $app->getContainer(); $this->itemMapper = $this->container->query(ItemMapper::class); $this->feedMapper = $this->container->query(FeedMapper::class); $this->folderMapper = $this->container->query(FolderMapper::class); $this->cleanUp(); $this->loadFixtures($this->folderMapper, $this->feedMapper, $this->itemMapper); }
public static function deleteUser($params) { $userId = $params['uid']; $app = new Application(); $container = $app->getContainer(); // order is important! $container->query('ItemBusinessLayer')->deleteUser($userId); $container->query('FeedBusinessLayer')->deleteUser($userId); $container->query('FolderBusinessLayer')->deleteUser($userId); }
protected function setUp() { $this->ownCloudVersion = \OCP\Util::getVersion(); $this->cleanUp(); $app = new Application(); $this->container = $app->getContainer(); $this->itemMapper = $this->container->query('OCA\\News\\Db\\ItemMapper'); $this->feedMapper = $this->container->query('OCA\\News\\Db\\FeedMapper'); $this->folderMapper = $this->container->query('OCA\\News\\Db\\FolderMapper'); $this->loadFixtures($this->folderMapper, $this->feedMapper, $this->itemMapper); }
public static function run() { $app = new Application(); $container = $app->getContainer(); // make it possible to turn off cron updates if you use an external // script to execute updates in paralell if ($container->query('Config')->getUseCronUpdates()) { $container->query('Updater')->beforeUpdate(); $container->query('Updater')->update(); $container->query('Updater')->afterUpdate(); } }
protected function setUp() { parent::setUp(); $app = new Application(); $this->container = $app->getContainer(); $this->tearDownUser($this->user); $this->setupUser($this->user, $this->userPassword); // set up database layers $this->itemMapper = $this->container->query(ItemMapper::class); $this->feedMapper = $this->container->query(FeedMapper::class); $this->folderMapper = $this->container->query(FolderMapper::class); }
<?php /** * ownCloud - News * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Bernhard Posselt <*****@*****.**> * @copyright Bernhard Posselt 2015 */ namespace OCA\News\AppInfo; use OCA\News\Upgrade\Upgrade; $app = new Application(); $app->getContainer()->query(Upgrade::class)->upgrade();
<?php /** * ownCloud - News * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Alessandro Cosentino <*****@*****.**> * @author Bernhard Posselt <*****@*****.**> * @copyright Alessandro Cosentino 2012 * @copyright Bernhard Posselt 2012, 2014 */ namespace OCA\News\Admin; use OCA\News\AppInfo\Application; use OCA\News\Controller\AdminController; $app = new Application(); $container = $app->getContainer(); $response = $container->query(AdminController::class)->index(); return $response->render();