Esempio n. 1
0
 public function getClient($folder = 'Test')
 {
     $mode = getenv('HttpPlayback');
     if ($mode == false) {
         $mode = 'playback';
     }
     $auth = ['server' => 'server', 'user' => 'user', 'password' => 'password'];
     if (is_file(getcwd() . '/Resources/auth.json')) {
         $auth = json_decode(file_get_contents(getcwd() . '/Resources/auth.json'), true);
     }
     $client = new API();
     $client->buildClient($auth['server'], $auth['user'], $auth['password'], ['httpPlayback' => ['mode' => $mode, 'recordFileName' => self::class . '.' . $this->getName() . '.json']]);
     return $client->getMailbox($folder);
 }