Example #1
0
	public function __construct($params) {
		$this->appName = 'contacts';
		parent::__construct($this->appName, $params);
		$this->container = $this->getContainer();
		$this->server = $this->container->getServer();
		$this->app = new App($this->container->query('API')->getUserId());
		$this->registerServices();
		$this->container->registerMiddleware('HttpMiddleware');
	}
Example #2
0
 public function __construct($params)
 {
     $this->appName = 'contacts';
     parent::__construct($this->appName, $params);
     $this->container = $this->getContainer();
     $this->server = $this->container->getServer();
     $userId = \OC::$server->getUserSession()->getUser()->getUID();
     $this->app = new App($userId);
     $this->registerServices();
     $this->container->registerMiddleware('HttpMiddleware');
 }
 public function __construct($params)
 {
     $this->appName = 'contacts';
     parent::__construct($this->appName, $params);
     $this->container = $this->getContainer();
     $this->server = $this->container->getServer();
     $user = \OC::$server->getUserSession()->getUser();
     if (is_null($user)) {
         \OC_Util::redirectToDefaultPage();
     }
     $userId = $user->getUID();
     $this->app = new App($userId);
     $this->registerServices();
     $this->container->registerMiddleware('HttpMiddleware');
 }