我一直对这个奇怪的问题感到困惑,它让我陷入了困境。请看一下。可能是另一只眼睛会发现错误。我已经粘贴了下面的代码,因此您可能会在第 21 行看到错误发生的位置('consumer_key' => $this->get_consumer_key(),)。
提前感谢您的帮助。干杯:)
<?php
class Xro_config {
//Set to true to enable Oauth debugging
protected $debug = true;
// public, partner, or private
protected $xro_app_type = "Public";
/*
* Xero Calback URL
*/
protected static $_oauth_callback = '';
/*
* Xero Signature keys
*/
protected $signatures = array(
// local
'consumer_key' => $this->get_consumer_key(),
'shared_secret' => $this->get_shared_secret(),
// 'rsa_private_key' => '/[path]/[privatekey].pem',
// 'rsa_public_key' => '/[path]/[publickey].cer'
);
protected static $_consumer_key;
protected static $_shared_secret;
/**
* Sets the Oauth Callback URL. The Default is in an emptystring
* @param string $URL
*/
public static function set_oauth_callback($URL) {
self::$_oauth_callback = $URL;
}
/**
* Gets the oauth_callback
*/
function get_oauth_callback(){
return self::$_oauth_callback;
}
/**
* Sets the Cusumer API KEys
* @param string $consumerkey
*/
public static function set_consumer_key($consumerkey) {
self::$_consumer_key = $consumerkey;
}
/**
* Sets the Cusumer API KEys
* @param string $sharedSecret
*/
public static function set_shared_secret($sharedSecret) {
self::$_shared_secret = $sharedSecret;
}
/*
* Get Signature Keys
*/
function get_consumer_key(){
return self::$_consumer_key;
}
function get_shared_secret(){
return self::$_shared_secret;
}
}
?>