Dotink\Parody\Mime::onCall PHP Метод

onCall() публичный Метод

Opens a method on the quip object
public onCall ( string $method ) : Mime
$method string The name of the method to open
Результат Mime The mime for method chaining
    public function onCall($method)
    {
        if (!$this->quip) {
            $this->resolve(self::create($this->class, TRUE));
        }
        if ($this->openMethod || $this->openProperty) {
            throw new \Exception(sprintf('Cannot open method %s without first give()-ing a return for %s', $method, $this->openMethod ?: $this->openProperty));
        }
        //
        // Allocate space for the method in the quip object and open
        // a method on it.
        //
        $this->quip->methods[$method] = array();
        $this->openMethod = $method;
        return $this;
    }