public function writeFunctionCall($funcname, PhpArgumentCollection $arguments = null)
    {
        try {
            $this->getStream()->write($funcname);
            $this->writeOpeningParenthesis();

            if (is_null($arguments) === false) {
                $this->writeArguments($arguments);
            }

            $this->writeClosingParenthesis();
        } catch (StreamException $e) {
            $msg = "An error occured while writing a function call.";
            throw new StreamAccessException($msg, $this, 0, $e);
        }
    }