We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attempting to create a decorator/wrapper that adds logging
<?php class OAuthWrapper extends \OAuth { public function __construct(\OAuth $oauth) { $oauth->enableDebug(); $this->oauth = $oauth; $this->debug = &$this->oauth->debug; // this line, it does nothing echo 'construct: ' . \json_encode($this->oauth->debug) . ' ' . \json_encode($this->debug) . "\n"; } // ... } $oauth new \OAuth(self::$consumerKey, self::$consumerSecret); @oauth2 = new \OAuthWrapper($oauth);
construct: true false
I would expect "true true"
Why is this->debug false?
false
Is the OAuth extension implemented in such a way that this is not possible?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Attempting to create a decorator/wrapper that adds logging
Outputs
I would expect "true true"
Why is this->debug
false
?Is the OAuth extension implemented in such a way that this is not possible?
The text was updated successfully, but these errors were encountered: