Beispiel #1
0
 public function __construct($appID = false, $appSecret = false, $code = false)
 {
     if ($appID === false) {
         $appID = trim(CSocServBitrix24Net::GetOption("bitrix24net_id"));
     }
     if ($appSecret === false) {
         $appSecret = trim(CSocServBitrix24Net::GetOption("bitrix24net_secret"));
     }
     list($prefix, $suffix) = explode(".", $appID, 2);
     if ($prefix === 'site') {
         $this->addScope("client");
     } elseif ($prefix == 'b24') {
         $this->addScope('profile');
     }
     $this->httpTimeout = SOCSERV_DEFAULT_HTTP_TIMEOUT;
     $this->appID = $appID;
     $this->appSecret = $appSecret;
     $this->code = $code;
 }