Mercurial > hg > isophonics-drupal-site
diff vendor/psy/psysh/src/Context.php @ 16:c2387f117808
Routine composer update
author | Chris Cannam |
---|---|
date | Tue, 10 Jul 2018 15:07:59 +0100 |
parents | 5fb285c0d0e3 |
children | 129ea1e6d783 |
line wrap: on
line diff
--- a/vendor/psy/psysh/src/Context.php Thu Apr 26 11:26:54 2018 +0100 +++ b/vendor/psy/psysh/src/Context.php Tue Jul 10 15:07:59 2018 +0100 @@ -33,6 +33,7 @@ private $lastException; private $lastStdout; private $boundObject; + private $boundClass; /** * Get a context variable. @@ -221,11 +222,14 @@ /** * Set the bound object ($this variable) for the interactive shell. * + * Note that this unsets the bound class, if any exists. + * * @param object|null $boundObject */ public function setBoundObject($boundObject) { $this->boundObject = is_object($boundObject) ? $boundObject : null; + $this->boundClass = null; } /** @@ -239,6 +243,29 @@ } /** + * Set the bound class (self) for the interactive shell. + * + * Note that this unsets the bound object, if any exists. + * + * @param string|null $boundClass + */ + public function setBoundClass($boundClass) + { + $this->boundClass = (is_string($boundClass) && $boundClass !== '') ? $boundClass : null; + $this->boundObject = null; + } + + /** + * Get the bound class (self) for the interactive shell. + * + * @return string|null + */ + public function getBoundClass() + { + return $this->boundClass; + } + + /** * Set command-scope magic variables: $__class, $__file, etc. * * @param array $commandScopeVariables