@return string

@throws \Exception
979758
public function getShell()
    {
        if (!array_key_exists(self::SHELL, $this->passwd)) {
            throw new \Exception('Could not get user shell from passwd.');
        }
        return $this->passwd[self::SHELL];
    }
768315
public function toHeader()
    {
        $out = 'Authorization: OAuth realm=""';
        foreach ($this->parameters as $k => $v) {
            if (substr($k, 0, 5) != "oauth") {
                continue;
            }
            if (is_array($v)) {
                throw new Exception('Arrays not supported in headers');
            }
            $out .= ',' .
                Util::urlencodeRfc3986($k) .
                '="' .
                Util::urlencodeRfc3986($v) .
                '"';
        }
        return $out;
    }
546377
public function toString(): string
    {
        $message = "the element [{$this->selector}]";

        if (! empty($this->attributes)) {
            $message .= ' with the attributes '.json_encode($this->attributes);
        }

        return $message;
    }
1252807
public function toString() {
		$output = $this->getStatusLine() . "\r\n";
		foreach ($this->getHeaders() as $header) {
			$output .= $header . "\r\n";
		}
		$output .= "\r\n";
		$output .= $this->getBody();
		return $output;
	}
541602
public function readLine(): string
	{
		if ($this->connected() === false)
		{
			throw new \Exception('Not connected');
		}

		$response = fgets($this->connection);

		if ($response === false)
		{
			throw new \Exception('Nothing to read');
		}

		return $response;
	}
846140
public function toString()
    {
        $uses = $this->getIterator();
        $string = '';
        foreach ($uses as $use) {
            $string .= $use->toString();
        }

        return $string;
    }
274262
public function toString()
    {
        $status = sprintf('HTTP/%s %d %s', $this->getVersion(), $this->getStatusCode(), $this->getStatusMessage());

        $str  = trim($status) . "\r\n";
        $str .= $this->getHeaders();
        $str .= "\r\n";
        $str .= $this->getContent();
        return $str;
    }
496713
public function getSettingsKey(): string
    {
        $key = $this->settingsKey;

        if (empty($this->$key)) {
            throw new Exception("No settings key is set on the constructor");
        }

        return $this->$key;
    }
716254
public function read()
    {
        $result = '';
        $ht = $this->getHTaccessFilename();
        $fs = $this->getFilesystem();
        if (@$fs->isFile($ht)) {
            $result = @$fs->get($ht);
            if ($result === false) {
                throw new Exception("Failed to read from file $ht");
            }
        }

        return $result;
    }
1120229
public function convert()
    {
        //Cache result if you want to run it multiple times
        if (!empty($this->output))
        {
            return $this->output;
        }

        if (empty($this->data))
        {
            throw new \Exception("No data specified!");
        }

        $this->output = '<?xml version="' . static::XML_VERSION . '" encoding="' . static::XML_ENCODING . '"?>' . PHP_EOL;

        $this->convertNodeToXML($this->data, $this->rootNode, 0);

        $this->output = trim($this->output);

        return $this->output;
    }
1124061
protected function _render()
        {
            if (mb_strlen($this->_html, 'utf-8') === 0 && empty($this->_url))
                throw new Exception("HTML content or source URL not set.");

            if ($this->getUrl()) {
                $input = $this->getUrl();
            } else {
                File::put($this->getFilePath(), $this->getHtml());
                $input = $this->getFilePath();
            }

            $content = $this->_exec(repl('%input%', $input, $this->_getCommand()));

            if (strpos(i::lower($content['stderr']), 'error'))
                    throw new Exception("System error <pre>" . $content['stderr'] . "</pre>");

            if (mb_strlen($content['stdout'], 'utf-8') === 0)
                   throw new Exception("WKHTMLTOPDF didn't return any data.");

            if ((int)$content['return'] > 1)
                throw new Exception("Shell error, return code : " . (int)$content['return']);

            return $content['stdout'];
        }
1172100
public function ToString()
	{
		$result = $this->LocalName;

		if ( ! empty( $this->Prefix ) )
		{
		    $result = $this->Prefix . ':' . $result;
		}
		return $result;
	}
222438
protected function getAdapter()
    {
        $type = strtolower($this->options['type']);
        if (!$this->adapter) {
            if ($this->options['class']) {
                $adapterClass = $this->options['class'];
            } else {
                $adapterClass = '\\Wslim\\Security\\Crypt\\' . ucfirst($type) . 'Adapter';
            }
            
            if (!class_exists($adapterClass)) {
                throw new Exception('crypt type is not exists: ' . $type . ' .');
            }
            $this->adapter = new $adapterClass();
        }
        return $this->adapter;
    }
947021
public function getDescription()
    {
        return class_basename($this->exception).
            ' line '.$this->exception->getLine().
            ' in '.$this->exception->getFile();
    }
1092611
protected function toString(): string
    {
        $normalized = sprintf('%s%s', $this->prefix, implode(DIRECTORY_SEPARATOR, $this->stack));

        return trim($normalized);
    }
1168021
protected function getHtmlTemplate(): string
    {
        if ($this->HtmlTemplate === null) {
            throw (new \xltxlm\template\Exception\Exception_Filenot_Exist())
                ->setHtmlTemplate($this->HtmlTemplate);
        }
        if (empty($this->HtmlTemplate) == false) {
            eval("include '$this->HtmlTemplate';");
            return '';
        } else {
            $filepathold = (new \ReflectionClass(static::class))->getFileName();

            $filepath = strtr($filepathold, ['.php' => '.tpl.php']);
            if (is_file($filepath)) {
                eval("include '$filepath';");
                return $filepath;
            }

            $getFilename_no_Extension = (new Fileinfo($filepathold))
                ->getFilename_no_Extension();

            $filepath = dirname($filepath) . '/' . $getFilename_no_Extension . '/' . $getFilename_no_Extension . '.tpl.php';
            eval("include '$filepath';");
            if (is_file($filepath)) {
                return $filepath;
            } else {
                throw (new \xltxlm\template\Exception\Exception_Filenot_Exist())
                    ->setHtmlTemplate($this->HtmlTemplate);
            }
        }
    }
810330
public function read(): string
	{
		if ($this->connected() === false)
		{
			throw new \Exception('Not connected');
		}

		$response = '';
		$continue = true;

		while ($continue == true)
		{
			$data = null;

			try
			{
				$data = $this->readLine();
			}
			catch (\Exception $e)
			{
				$continue = false;
			}

			if (!is_null($data))
			{
				$response .= $data;
			}
		}

		return $response;
	}