예제 #1
0
 /**
  * Avos\Client::initialize, must be called before using Avos features.
  *
  * @param string $app_id Avos Application ID
  * @param string $app_key Avos REST API Key
  * @param string $master_key Avos Master Key
  *
  * @return null
  */
 public static function initialize($app_id, $app_key, $master_key)
 {
     AVUser::registerSubclass();
     AVRole::registerSubclass();
     AVInstallation::registerSubclass();
     self::$applicationId = $app_id;
     self::$appKey = $app_key;
     self::$masterKey = $master_key;
     if (!static::$storage) {
         if (session_status() === PHP_SESSION_ACTIVE) {
             self::setStorage(new AVSessionStorage());
         } else {
             self::setStorage(new AVMemoryStorage());
         }
     }
 }