1

Fatal error: Access to undeclared static property: DTS\eBaySDK\Constants\GlobalIds::$stripped in /home/jimi13/public_html/dealpopup.com/ebayapi/finding/mine.php on line 334

$stripped = str_replace(' ', '', $country);
$stripped = preg_replace('/\s+/', '', $stripped);
echo $stripped;

need to take put stripped into this

$service = new Services\FindingService([
    'credentials' => $config['production']['credentials'],
    'globalId'    => Constants\GlobalIds::US
]);

need to put this in, but throws error

$service = new Services\FindingService([
    'credentials' => $config['production']['credentials'],
    'globalId'    => Constants\GlobalIds::$stripped
]);
2
  • Think it is stackoverflow.com/questions/7506530/… Commented Oct 22, 2019 at 17:50
  • Thanks for the help, I have not yet been able to send what I need. I am trying to send the variable $stripped in place of the US. How would I achieve that Commented Oct 22, 2019 at 21:07

1 Answer 1

0

Here is a way you can access a constant variable in the class with namespace. If no namespace then you can remove the Constants namespace.

namespace Constants;

class Hello {
  const WORLD = 'Hello World';
}

$world = 'WORLD';
echo constant('Constants\Hello::' . $world);
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.