public static function setUpBeforeClass()
 {
     ParseClient::_unsetStorage();
     session_start();
     ParseTestHelper::setUp();
     self::$parseStorage = ParseClient::getStorage();
 }
Ejemplo n.º 2
0
 public function logout(Request $request, Response $response, $args)
 {
     $this->logger->info("Login page action dispatched");
     $uri = $request->getUri();
     try {
         $this->userRepository->logOut();
         $this->currentUser = $this->userRepository->getCurrentUser();
         ParseClient::getStorage()->set('company', null);
     } catch (ParseException $e) {
         ParseErrorHandler::handleParseError($e);
     }
     return $response->withStatus(302)->withHeader('Location', $uri->withPath('login'));
 }
Ejemplo n.º 3
0
 public function setCurrentCompany($company)
 {
     static::$currentCompany = $company;
     ParseClient::getStorage()->set('company', $company);
     return;
 }
Ejemplo n.º 4
0
 /**
  * Get the ParseClient storage object (if set) or ParseMemoryStorage as default.
  *
  * @return ParseMemoryStorage
  */
 public static function Storage()
 {
     return ParseClient::getStorage() ?: ParseHelper::MemoryStorage();
 }
 function __construct($cacheListObjects = false, $chainExecHandler = null, $cacheStorage = null)
 {
     $this->cacheStorage = $cacheStorage ?: ParseClient::getStorage() ?: new ParseMemoryStorage();
     $this->cacheListObjects = $cacheListObjects;
     $this->chainExecHandler = $chainExecHandler;
 }
Ejemplo n.º 6
0
 public static function setUpBeforeClass()
 {
     Helper::setUp();
     self::$parseStorage = ParseClient::getStorage();
 }