Created
January 20, 2016 17:30
-
-
Save filbertkm/fe0458fafb2ceb42c63f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Constructor | |
* @param IContextSource $context IContextSource to inherit from | |
*/ | |
public function __construct( IContextSource $context ) { | |
if ( ! ( $context instanceof MutableContext ) ) { | |
$context = $this->getMutableContextFromIContextSource( $context ); | |
} | |
// Clone the original context object so we can change it without changing the | |
// source context one. | |
$context = clone $context; | |
// set this cloned context object as the context of this DerivativeContext instance, | |
// so any set*-call will be done on this one, like any get*-call | |
$this->setContext( $context ); | |
} | |
/** | |
* @deprecated since 1.27 blah blah blah | |
* @returns MutableContext | |
*/ | |
private function getMutableContextFromIContextSource( IContextSource $context ) { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment