This commit is contained in:
smiley
2024-05-04 19:24:38 +02:00
parent ee8a19ab8b
commit f28605c809
2 changed files with 7 additions and 7 deletions
+4 -4
View File
@@ -22,8 +22,8 @@ use function sprintf;
*/
class QRMarkupXML extends QRMarkup{
final public const MIME_TYPE = 'application/xml';
protected const XML_SCHEMA = 'https://raw.githubusercontent.com/chillerlan/php-qrcode/main/src/Output/qrcode.schema.xsd';
final public const MIME_TYPE = 'application/xml';
final public const SCHEMA = 'https://raw.githubusercontent.com/chillerlan/php-qrcode/main/src/Output/qrcode.schema.xsd';
protected DOMDocument $dom;
@@ -52,7 +52,7 @@ class QRMarkupXML extends QRMarkup{
$root = $this->dom->createElement('qrcode');
$root->setAttribute('xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance');
$root->setAttribute('xsi:noNamespaceSchemaLocation', $this::XML_SCHEMA);
$root->setAttribute('xsi:noNamespaceSchemaLocation', $this::SCHEMA);
$root->setAttribute('version', $this->matrix->getVersion());
$root->setAttribute('eccLevel', $this->matrix->getEccLevel());
$root->appendChild($this->createMatrix());
@@ -120,7 +120,7 @@ class QRMarkupXML extends QRMarkup{
}
/**
* Creates a DOM element for single module
* Creates a DOM element for a single module
*/
protected function module(int $x, int $y, int $M_TYPE):DOMElement|null{
$isDark = $this->matrix->isDark($M_TYPE);
+3 -3
View File
@@ -36,7 +36,7 @@
</xs:element>
<xs:element name="matrix">
<xs:annotation>
<xs:documentation>The matrix holds the encoded data in a 2-dimensional array of modules</xs:documentation>
<xs:documentation>The matrix holds the encoded data in a 2-dimensional array of modules.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
@@ -64,7 +64,7 @@
</xs:attribute>
<xs:attribute name="quietzoneSize" use="required" type="xs:nonNegativeInteger">
<xs:annotation>
<xs:documentation>The size of the quiet zone (margin around the QR symbol)</xs:documentation>
<xs:documentation>The size of the quiet zone (margin around the QR symbol).</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="size" use="required">
@@ -92,7 +92,7 @@
</xs:element>
<xs:element name="row">
<xs:annotation>
<xs:documentation>A row holds an array of modules</xs:documentation>
<xs:documentation>A row holds an array of modules.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>