smiley 1 год назад
Родитель
Сommit
bbb2414f10
4 измененных файлов с 38 добавлено и 8 удалено
  1. 1 1
      docs/Usage/Configuration-settings.md
  2. 2 1
      docs/Usage/Overview.md
  3. 3 3
      docs/index.rst
  4. 32 3
      docs/qroptions-doc.php

+ 1 - 1
docs/Usage/Configuration-settings.md

@@ -1,5 +1,5 @@
 # Configuration settings
 # Configuration settings
-<!-- This file is auto generated from the source of QROptionsTrait.php -->
+<!-- This file is auto generated from the source of QROptions.php -->
 ## version
 ## version
 
 
 QR Code version number
 QR Code version number

+ 2 - 1
docs/Usage/Overview.md

@@ -31,9 +31,9 @@ It also features a QR Code reader based on a [PHP port](https://github.com/khana
 - PHP 7.4+
 - PHP 7.4+
   - [`ext-mbstring`](https://www.php.net/manual/book.mbstring.php)
   - [`ext-mbstring`](https://www.php.net/manual/book.mbstring.php)
   - optional:
   - optional:
-    - [`ext-fileinfo`](https://www.php.net/manual/book.fileinfo.php) (required by `QRImagick` output)
     - [`ext-gd`](https://www.php.net/manual/book.image)
     - [`ext-gd`](https://www.php.net/manual/book.image)
     - [`ext-imagick`](https://github.com/Imagick/imagick) with [ImageMagick](https://imagemagick.org) installed
     - [`ext-imagick`](https://github.com/Imagick/imagick) with [ImageMagick](https://imagemagick.org) installed
+      - [`ext-fileinfo`](https://www.php.net/manual/book.fileinfo.php) (required by `QRImagick` output)
     - [`setasign/fpdf`](https://github.com/setasign/fpdf) for the PDF output module
     - [`setasign/fpdf`](https://github.com/setasign/fpdf) for the PDF output module
 
 
 For the QR Code reader, either `ext-gd` or `ext-imagick` is required!
 For the QR Code reader, either `ext-gd` or `ext-imagick` is required!
@@ -54,6 +54,7 @@ For the QR Code reader, either `ext-gd` or `ext-imagick` is required!
   - [floating-share-button](https://github.com/qriouslad/floating-share-button)
   - [floating-share-button](https://github.com/qriouslad/floating-share-button)
 - WoltLab Suite
 - WoltLab Suite
   - [two-step-verification](http://pluginstore.woltlab.com/file/3007-two-step-verification/)
   - [two-step-verification](http://pluginstore.woltlab.com/file/3007-two-step-verification/)
+  - [[Developer] PHP QR Code](https://www.woltlab.com/pluginstore/file/7995-entwickler-php-qr-code/)
 - other uses:
 - other uses:
   - [dependents](https://github.com/chillerlan/php-qrcode/network/dependents) / [packages](https://github.com/chillerlan/php-qrcode/network/dependents?dependent_type=PACKAGE)
   - [dependents](https://github.com/chillerlan/php-qrcode/network/dependents) / [packages](https://github.com/chillerlan/php-qrcode/network/dependents?dependent_type=PACKAGE)
   - [Appwrite](https://github.com/appwrite/appwrite)
   - [Appwrite](https://github.com/appwrite/appwrite)

+ 3 - 3
docs/index.rst

@@ -1,9 +1,9 @@
 .. php-qrcode documentation master file, created by sphinx-quickstart on Sun Jul  9 21:45:56 2023.
 .. php-qrcode documentation master file, created by sphinx-quickstart on Sun Jul  9 21:45:56 2023.
    markdown-rst converter: https://pandoc.org/try/
    markdown-rst converter: https://pandoc.org/try/
 
 
-=================
-PHP-QRCode Manual
-=================
+============================
+chillerlan PHP-QRCode Manual
+============================
 
 
 User manual for `chillerlan/php-qrcode <https://github.com/chillerlan/php-qrcode/>`__  [|version|]. Updated on |today|.
 User manual for `chillerlan/php-qrcode <https://github.com/chillerlan/php-qrcode/>`__  [|version|]. Updated on |today|.
 
 

+ 32 - 3
docs/qroptions-doc.php

@@ -35,7 +35,8 @@ foreach($reflectionClass->getProperties(ReflectionProperty::IS_PROTECTED) as $re
 	array_shift($lines);
 	array_shift($lines);
 	array_pop($lines);
 	array_pop($lines);
 
 
-	$see = [];
+	$see  = [];
+	$link = [];
 
 
 	foreach($lines as $line){
 	foreach($lines as $line){
 
 
@@ -50,7 +51,14 @@ foreach($reflectionClass->getProperties(ReflectionProperty::IS_PROTECTED) as $re
 
 
 		// collect links for "see also"
 		// collect links for "see also"
 		if(str_starts_with($line, '@see')){
 		if(str_starts_with($line, '@see')){
-			$see[] = $line;
+			$see[] = substr($line, 5); // cut off the "@see "
+
+			continue;
+		}
+
+		// collect links for "links"
+		if(str_starts_with($line, '@link')){
+			$link[] = substr($line, 6); // cut off the "@link "
 
 
 			continue;
 			continue;
 		}
 		}
@@ -63,7 +71,6 @@ foreach($reflectionClass->getProperties(ReflectionProperty::IS_PROTECTED) as $re
 		$content[] = "\n**See also:**\n";
 		$content[] = "\n**See also:**\n";
 
 
 		foreach($see as $line){
 		foreach($see as $line){
-			$line = substr($line, 5); // cut off the "@see "
 
 
 			// normal links
 			// normal links
 			if(str_starts_with($line, 'http')){
 			if(str_starts_with($line, 'http')){
@@ -88,6 +95,28 @@ foreach($reflectionClass->getProperties(ReflectionProperty::IS_PROTECTED) as $re
 
 
 	}
 	}
 
 
+	// add "Links" section
+	if(!empty($link)){
+		$content[] = "\n**Links:**\n";
+
+		foreach($link as $line){
+
+			// skip non-url
+			if(!str_starts_with($line, 'http')){
+				continue;
+			}
+
+			$url = explode(' ', $line, 2);
+
+			$content[] = match(count($url)){
+				1 => sprintf('- [%s](%s)', explode('://', $url[0])[1], $url[0]),
+				2 => sprintf('- [%s](%s)', trim($url[1]), $url[0]),
+			};
+
+		}
+
+	}
+
 	$content[] = "\n";
 	$content[] = "\n";
 }
 }