@return string

@throws \Exception
350571
public function render()
    {
        //test required fields
        if (empty($this->propertyList['title'])) {
            throw new \Exception('Open Graph page title not specified');
        }

        if (empty($this->propertyList['type'])) {
            throw new \Exception('Open Graph page type not specified');
        }

        if (empty($this->propertyList['image'])) {
            throw new \Exception('Open Graph page image not specified');
        }

        if (empty($this->propertyList['url'])) {
            throw new \Exception('Open Graph page URL not specified');
        }

        // render
        $tags = array();
        $metaTagPattern = '<meta property="%s" content="%s" />';
        
        foreach(array_filter($this->propertyList) as $propertyName => $propertyValue) {
            $tags[] = sprintf($metaTagPattern, 'og:' . $propertyName, $propertyValue);
        }

        if (count($this->facebookAdminList)) {
            $tags[] = sprintf($metaTagPattern, 'fb:admins', implode(';', $this->facebookAdminList));
        }

        return implode(PHP_EOL, $tags);
    }
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;
    }
319447
public function getDriver(): string
    {
        // Extract driver name from current config
        $driver = $this->getConfig('driver');

        try {
            if (!\is_string($driver)) {
                throw new Exception('Wrong type of "driver" item in config, must be a string');
            }

            if (!\in_array($driver, self::ALLOWED_DRIVERS, false)) {
                $allowed = implode(',', self::ALLOWED_DRIVERS);
                throw new Exception("Driver \"$driver\" is not in allowed list [" . $allowed . ']');
            }
        } catch (Exception $e) {
            // __constructor
        }

        return __NAMESPACE__ . '\\Drivers\\' . ucfirst(strtolower($driver));
    }
185269
public function toString(): string
    {
        $content = $this->content;
        $contentType = $this->contentType;

        if ($this->isString()) {
            return $content;
        } elseif ($this->isImage()) {
            switch ($contentType) {
                case self::CONTENT_TYPE_IMAGE_JPEG:
                    imagejpeg($content)
                        && imagedestroy($content);
                    break;
                case self::CONTENT_TYPE_IMAGE_PNG:
                    imagepng($content)
                        && imagedestroy($content);
                    break;
                case self::CONTENT_TYPE_IMAGE_GIF:
                    imagegif($content)
                        && imagedestroy($content);
                    break;
                default:
                    throw new HttpException("Unimplemented content type '{$contentType}'");
            }
            return '';
        }
    }
1315252
public function toString()
    {
        $newLine = "\n";
        $string = $newLine . $newLine;

        $i = 0;
        foreach ($this->dns as $dns) {
            ++$i;
            $string .= 'DNS.' . $i . ' = ' . $dns .$newLine;
        }

        $i = 0;
        foreach ($this->ip as $ip) {
            ++$i;
            $string .= 'IP.' . $i . ' = ' . $ip .$newLine;
        }

        $i = 0;
        foreach ($this->url as $url) {
            ++$i;
            $string .= 'URL.' . $i . ' = ' . $url .$newLine;
        }

        return $string;
    }
113345
public function getArray()
    {
        $config = @include $this->location;
        if (!is_array($config)) {
            throw new \Exception('Config not found');
        }

        $this->config = $config;

        return $config;
    }
633549
public function getRuntimePath(): string
    {
        if ($this->_runtimePath !== null) {
            return $this->_runtimePath;
        }
        $runtimePath = Yii::getAlias('@runtime');

        if ($runtimePath === false) {
            throw new Exception('There was a problem getting the vendor path.');
        }
        return $this->_runtimePath = FileHelper::normalizePath($runtimePath);
    }
1111062
public function toString()
    {
        $string = '';
        $methods = $this->getIterator();
        foreach ($methods as $method) {
            $string .= $method->toString();
        }

        return $string;
    }
1052524
public function getText()
    {
        $text = $this->message[0];
        if (!is_string($text)) {
            if ($text instanceof \Throwable || $text instanceof \Exception) {
                $text = (string) $text;
            } else {
                $text = VarDumper::export($text);
            }
        }
        return $text;
    }
1172100
public function ToString()
	{
		$result = $this->LocalName;

		if ( ! empty( $this->Prefix ) )
		{
		    $result = $this->Prefix . ':' . $result;
		}
		return $result;
	}
947021
public function getDescription()
    {
        return class_basename($this->exception).
            ' line '.$this->exception->getLine().
            ' in '.$this->exception->getFile();
    }
175947
function toString()
    {
        $ModeXXX = implode('', $this->mode_xxx);
        if (!array_key_exists($ModeXXX, $this->mode_available))
            throw new \Exception(sprintf(
                'Invalid Open Mode Statement (%s). it`s must readable/writable or both with optional flags.'
                .' like: r+, W, rb+, ...'
                , $ModeXXX
            ));

        $mode = $this->mode_available[$ModeXXX];
        if ($this->isBinary()) {
            $base = substr($mode, 0, 1);
            // r|b|+
            $mode = $base.'b'.substr($mode, 1);
        }

        return $mode;
    }
1179595
public static function ConvertToString (\Exception $e) {
		return sprintf(
			'#message %s %s(%s) %s',
			static::ConvertinternalEncoding($e->getMessage()),
			static::ConvertinternalEncoding($e->getFile()),
			$e->getLine(),
			static::ConvertinternalEncoding(str_replace(array("\n", "\r", "\r\n"), " ", $e->getTraceAsString()))
		);
	}
705903
public function toString ()
	{
		$content = "<VirtualHost {$this->address}:{$this->port}>" . PHP_EOL;
		
		foreach ($this->directives as $directive) {
			$content .= $directive->toString() . PHP_EOL;
		}
		
		$content .= PHP_EOL;
		
		foreach ($this->directories as $directory) {
			$content .= $directory->toString() . PHP_EOL;
		}
		$content .= PHP_EOL;
		
		$content .= "</VirtualHost>";
		
		return $content;
	}
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;
    }
1172434
protected function getRequest()
    {
        $url = $this->buildUrl($this->getBody());

        $response = $this->client->get($url, [
            'auth'    => $this->getAuth(),
            'headers' => [
                'Accept' => 'application/json',
            ],
        ]);

        if ($response->getStatusCode() != 201 && $response->getStatusCode() != 200) {
            throw new \Exception('Unable to request from API.');
        }

        return $response;
    }
1146553
public function getContents() : string
	{
		if (! \is_resource($this->resource))
		{
			throw new Exception\UnreadableStreamException('Stream is not resourceable');
		}

		if (! $this->isReadable())
		{
			throw new Exception\UnreadableStreamException('Stream is not readable');
		}

		$result = \stream_get_contents($this->resource);

		if (false === $result)
		{
			throw new Exception\UnreadableStreamException('Unable to read remainder of the stream');
		}

		return $result;
	}