/var/www/cobraambalaj/vendor/psy/psysh/src/TabCompletion/Matcher
Edit: /var/www/cobraambalaj/vendor/psy/psysh/src/TabCompletion/Matcher/AbstractContextAwareMatcher.php (1324B)
*/
abstract class AbstractContextAwareMatcher extends AbstractMatcher implements ContextAware
{
/**
* Context instance (for ContextAware interface).
*
* @var Context
*/
protected $context;
/**
* ContextAware interface.
*
* @param Context $context
*/
public function setContext(Context $context)
{
$this->context = $context;
}
/**
* Get a Context variable by name.
*
* @param string $var Variable name
*
* @return mixed
*/
protected function getVariable($var)
{
return $this->context->get($var);
}
/**
* Get all variables in the current Context.
*
* @return array
*/
protected function getVariables()
{
return $this->context->getAll();
}
}