Dotink\Parody\Mime::give PHP Method

give() public method

Define a value to give for the open method or property
public give ( mixed $value = NULL ) : Mime
$value mixed The value to return for the open method or property
return Mime For method chaining
    public function give($value = NULL)
    {
        if ($this->openMethod) {
            $this->quip->methods[$this->openMethod][] = ['expectation' => $this->expectation, 'value' => $value];
            //
            // Reset our expectation array and our openMethod
            //
            $this->openMethod = FALSE;
            $this->expectation = array();
        } elseif ($this->openProperty) {
            $this->quip->properties[$this->openProperty] = $value;
            $this->openProperty = FALSE;
        } else {
            throw new \Exception(sprintf('Cannot give() anything here.  There is no open method or property'));
        }
        return $this;
    }