src/Middleware.php
public function as($context)
    {
        assert(is_object($context) || is_string($context) || is_null($context));

        if (is_string($context) && property_exists($this, $context)) {
            $this->context = &$this->$context;
        } elseif (is_object($context) || $context === static::CONTEXT_SELF) {
            $this->context = $context;
        }
        return $this;
    }
public function as($context)
    {
        assert(is_object($context) || is_string($context) || is_null($context));

        if (is_string($context) && property_exists($this, $context)) {
            $this->context = &$this->$context;
        } elseif (is_object($context) || $context === static::CONTEXT_SELF) {
            $this->context = $context;
        }
        return $this;
    }
$context setter.

@throws \MichaelRShelton\MiddleMan\Exceptions\InvalidArgumentException

@deprecated for as()

@param object|string|null $context
@return $this