prepareModuleValue()
@@ -1459,39 +1466,38 @@ note: css4 colors are not included
- collects the modules per QRMatrix::M_* type and runs a $transform function on each module and
-returns an array with the transformed modules
+ collects the modules per QRMatrix::M_* type, runs a transform method on each module and
+returns an array with the transformed modules.
protected
- collectModules(Closure $transform) : array<int, mixed>
+ collectModules() : array<int, mixed>
- The transform callback is called with the following parameters:
-$x - current column
-$y - current row
-$M_TYPE - field value
-$M_TYPE_LAYER - (possibly modified) field value that acts as layer id
-
-
- Parameters
-
- -
- $transform
- : Closure
-
- -
-
-
-
-
+
+
+
+
+ -
+ see
+
+ -
+ QROutputAbstract::moduleTransform()
+
+
+
+
@@ -2040,6 +2046,94 @@ in long loops for a significant performance increase.
DOMElement|null
+
+
+
+
+
+ The transform callback for the module collector
+
+
+ protected
+ moduleTransform(int $x, int $y, int $M_TYPE, int $M_TYPE_LAYER) : mixed
+
+
+
+
+ $x - current column
+$y - current row
+$M_TYPE - field value
+$M_TYPE_LAYER - (possibly modified) field value that acts as layer id ($paths array key)
+This method should return a value suitable for the current output class.
+It must return null for an empty value.
+
+
+ Parameters
+
+ -
+ $x
+ : int
+
+ -
+
+
+ -
+ $y
+ : int
+
+ -
+
+
+ -
+ $M_TYPE
+ : int
+
+ -
+
+
+ -
+ $M_TYPE_LAYER
+ : int
+
+ -
+
+
+
+
+
+
+
+ -
+ see
+
+ -
+ QROutputAbstract::collectModules()
+
+
+
+
+
+
+
+
getOutputDimensions()
guessMimeType()
module()
+ moduleTransform()
prepareModuleValue()
row()
saveToFile()
diff --git a/classes/chillerlan-QRCode-Output-QROutputAbstract.html b/classes/chillerlan-QRCode-Output-QROutputAbstract.html
index 014e34c56..c0343f877 100644
--- a/classes/chillerlan-QRCode-Output-QROutputAbstract.html
+++ b/classes/chillerlan-QRCode-Output-QROutputAbstract.html
@@ -301,8 +301,8 @@
: array<int, mixed>
-
prepareModuleValue()
@@ -1157,39 +1164,38 @@ in long loops for a significant performance increase.
- collects the modules per QRMatrix::M_* type and runs a $transform function on each module and
-returns an array with the transformed modules
+ collects the modules per QRMatrix::M_* type, runs a transform method on each module and
+returns an array with the transformed modules.
protected
- collectModules(Closure $transform) : array<int, mixed>
+ collectModules() : array<int, mixed>
- The transform callback is called with the following parameters:
-$x - current column
-$y - current row
-$M_TYPE - field value
-$M_TYPE_LAYER - (possibly modified) field value that acts as layer id
-
-
- Parameters
-
- -
- $transform
- : Closure
-
- -
-
-
-
-
+
+
+
+
+ -
+ see
+
+ -
+ QROutputAbstract::moduleTransform()
+
+
+
+
@@ -1500,6 +1506,94 @@ in long loops for a significant performance increase.
string
+
+
+
+
+
+ The transform callback for the module collector
+
+
+ protected
+ moduleTransform(int $x, int $y, int $M_TYPE, int $M_TYPE_LAYER) : mixed
+
+
+
+
+ $x - current column
+$y - current row
+$M_TYPE - field value
+$M_TYPE_LAYER - (possibly modified) field value that acts as layer id ($paths array key)
+This method should return a value suitable for the current output class.
+It must return null for an empty value.
+
+
+ Parameters
+
+ -
+ $x
+ : int
+
+ -
+
+
+ -
+ $y
+ : int
+
+ -
+
+
+ -
+ $M_TYPE
+ : int
+
+ -
+
+
+ -
+ $M_TYPE_LAYER
+ : int
+
+ -
+
+
+
+
+
+
+
+ -
+ see
+
+ -
+ QROutputAbstract::collectModules()
+
+
+
+
+
+
+
+
getModuleValueAt()
getOutputDimensions()
guessMimeType()
+ moduleTransform()
prepareModuleValue()
saveToFile()
setMatrixDimensions()
diff --git a/classes/chillerlan-QRCode-Output-QRStringJSON.html b/classes/chillerlan-QRCode-Output-QRStringJSON.html
index 02b6f4cc5..d86af5070 100644
--- a/classes/chillerlan-QRCode-Output-QRStringJSON.html
+++ b/classes/chillerlan-QRCode-Output-QRStringJSON.html
@@ -352,8 +352,8 @@ note: css4 colors are not included
: array<int, mixed>
-
prepareModuleValue()
@@ -1480,39 +1487,38 @@ note: css4 colors are not included
- collects the modules per QRMatrix::M_* type and runs a $transform function on each module and
-returns an array with the transformed modules
+ collects the modules per QRMatrix::M_* type, runs a transform method on each module and
+returns an array with the transformed modules.
protected
- collectModules(Closure $transform) : array<int, mixed>
+ collectModules() : array<int, mixed>
- The transform callback is called with the following parameters:
-$x - current column
-$y - current row
-$M_TYPE - field value
-$M_TYPE_LAYER - (possibly modified) field value that acts as layer id
-
-
- Parameters
-
- -
- $transform
- : Closure
-
- -
-
-
-
-
+
+
+
+
+ -
+ see
+
+ -
+ QROutputAbstract::moduleTransform()
+
+
+
+
@@ -1856,6 +1862,94 @@ in long loops for a significant performance increase.
array<string|int, mixed>|null
+
+
+
+
+
+ The transform callback for the module collector
+
+
+ protected
+ moduleTransform(int $x, int $y, int $M_TYPE, int $M_TYPE_LAYER) : mixed
+
+
+
+
+ $x - current column
+$y - current row
+$M_TYPE - field value
+$M_TYPE_LAYER - (possibly modified) field value that acts as layer id ($paths array key)
+This method should return a value suitable for the current output class.
+It must return null for an empty value.
+
+
+ Parameters
+
+ -
+ $x
+ : int
+
+ -
+
+
+ -
+ $y
+ : int
+
+ -
+
+
+ -
+ $M_TYPE
+ : int
+
+ -
+
+
+ -
+ $M_TYPE_LAYER
+ : int
+
+ -
+
+
+
+
+
+
+
+ -
+ see
+
+ -
+ QROutputAbstract::collectModules()
+
+
+
+
+
+
+
+
getOutputDimensions()
guessMimeType()
module()
+ moduleTransform()
prepareModuleValue()
row()
saveToFile()
diff --git a/classes/chillerlan-QRCode-Output-QRStringText.html b/classes/chillerlan-QRCode-Output-QRStringText.html
index a9ced2873..84cb929d0 100644
--- a/classes/chillerlan-QRCode-Output-QRStringText.html
+++ b/classes/chillerlan-QRCode-Output-QRStringText.html
@@ -326,8 +326,8 @@
: array<int, mixed>
-
prepareModuleValue()
@@ -1429,39 +1436,38 @@ you need to supply the $file parameter here in that case (or handle the option v
- collects the modules per QRMatrix::M_* type and runs a $transform function on each module and
-returns an array with the transformed modules
+ collects the modules per QRMatrix::M_* type, runs a transform method on each module and
+returns an array with the transformed modules.
protected
- collectModules(Closure $transform) : array<int, mixed>
+ collectModules() : array<int, mixed>
- The transform callback is called with the following parameters:
-$x - current column
-$y - current row
-$M_TYPE - field value
-$M_TYPE_LAYER - (possibly modified) field value that acts as layer id
-
-
- Parameters
-
- -
- $transform
- : Closure
-
- -
-
-
-
-
+
+
+
+
+ -
+ see
+
+ -
+ QROutputAbstract::moduleTransform()
+
+
+
+
@@ -1776,6 +1782,94 @@ in long loops for a significant performance increase.
string
+
+
+
+
+
+ The transform callback for the module collector
+
+
+ protected
+ moduleTransform(int $x, int $y, int $M_TYPE, int $M_TYPE_LAYER) : mixed
+
+
+
+
+ $x - current column
+$y - current row
+$M_TYPE - field value
+$M_TYPE_LAYER - (possibly modified) field value that acts as layer id ($paths array key)
+This method should return a value suitable for the current output class.
+It must return null for an empty value.
+
+
+ Parameters
+
+ -
+ $x
+ : int
+
+ -
+
+
+ -
+ $y
+ : int
+
+ -
+
+
+ -
+ $M_TYPE
+ : int
+
+ -
+
+
+ -
+ $M_TYPE_LAYER
+ : int
+
+ -
+
+
+
+
+
+
+
+ -
+ see
+
+ -
+ QROutputAbstract::collectModules()
+
+
+
+
+
+
+
+
getModuleValueAt()
getOutputDimensions()
guessMimeType()
+ moduleTransform()
prepareModuleValue()
saveToFile()
setMatrixDimensions()
diff --git a/classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html b/classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html
index e256d7d06..53f58ff26 100644
--- a/classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html
+++ b/classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html
@@ -316,7 +316,7 @@
@@ -351,7 +351,7 @@
@@ -359,7 +359,7 @@
public
- testMask(int $pattern, array<string|int, mixed> $expected) : void
+ testMask(int $pattern, array<string|int, array<string|int, int>> $expected) : void
@@ -376,7 +376,7 @@
$expected
- : array<string|int, mixed>
+ : array<string|int, array<string|int, int>>
@@ -417,7 +417,7 @@
@@ -451,7 +451,7 @@
@@ -485,7 +485,7 @@
@@ -519,7 +519,7 @@
@@ -553,14 +553,14 @@
private
- assertMask(Closure $mask, array<string|int, mixed> $expected) : bool
+ assertMask(Closure $mask, array<string|int, array<string|int, int>> $expected) : bool
@@ -577,7 +577,7 @@
$expected
- : array<string|int, mixed>
+ : array<string|int, array<string|int, int>>
diff --git a/js/searchIndex.js b/js/searchIndex.js
index 7a0e78e0e..abf0be9a0 100644
--- a/js/searchIndex.js
+++ b/js/searchIndex.js
@@ -2491,10 +2491,10 @@ Search.appendIndex(
"summary": "returns\u0020one\u0020or\u0020more\u0020EPS\u0020path\u0020blocks",
"url": "classes/chillerlan-QRCode-Output-QREps.html#method_paths"
}, {
- "fqsen": "\\chillerlan\\QRCode\\Output\\QREps\u003A\u003Amodule\u0028\u0029",
- "name": "module",
+ "fqsen": "\\chillerlan\\QRCode\\Output\\QREps\u003A\u003AmoduleTransform\u0028\u0029",
+ "name": "moduleTransform",
"summary": "Returns\u0020a\u0020path\u0020segment\u0020for\u0020a\u0020single\u0020module",
- "url": "classes/chillerlan-QRCode-Output-QREps.html#method_module"
+ "url": "classes/chillerlan-QRCode-Output-QREps.html#method_moduleTransform"
}, {
"fqsen": "\\chillerlan\\QRCode\\Output\\QREps\u003A\u003AMIME_TYPE",
"name": "MIME_TYPE",
@@ -2916,10 +2916,10 @@ Search.appendIndex(
"summary": "renders\u0020and\u0020returns\u0020a\u0020single\u0020\u003Cpath\u003E\u0020element",
"url": "classes/chillerlan-QRCode-Output-QRMarkupSVG.html#method_path"
}, {
- "fqsen": "\\chillerlan\\QRCode\\Output\\QRMarkupSVG\u003A\u003Amodule\u0028\u0029",
- "name": "module",
+ "fqsen": "\\chillerlan\\QRCode\\Output\\QRMarkupSVG\u003A\u003AmoduleTransform\u0028\u0029",
+ "name": "moduleTransform",
"summary": "returns\u0020a\u0020path\u0020segment\u0020for\u0020a\u0020single\u0020module",
- "url": "classes/chillerlan-QRCode-Output-QRMarkupSVG.html#method_module"
+ "url": "classes/chillerlan-QRCode-Output-QRMarkupSVG.html#method_moduleTransform"
}, {
"fqsen": "\\chillerlan\\QRCode\\Output\\QRMarkupSVG\u003A\u003AMIME_TYPE",
"name": "MIME_TYPE",
@@ -3038,8 +3038,13 @@ Search.appendIndex(
}, {
"fqsen": "\\chillerlan\\QRCode\\Output\\QROutputAbstract\u003A\u003AcollectModules\u0028\u0029",
"name": "collectModules",
- "summary": "collects\u0020the\u0020modules\u0020per\u0020QRMatrix\u003A\u003AM_\u002A\u0020type\u0020and\u0020runs\u0020a\u0020\u0024transform\u0020function\u0020on\u0020each\u0020module\u0020and\nreturns\u0020an\u0020array\u0020with\u0020the\u0020transformed\u0020modules",
+ "summary": "collects\u0020the\u0020modules\u0020per\u0020QRMatrix\u003A\u003AM_\u002A\u0020type,\u0020runs\u0020a\u0020transform\u0020method\u0020on\u0020each\u0020module\u0020and\nreturns\u0020an\u0020array\u0020with\u0020the\u0020transformed\u0020modules.",
"url": "classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_collectModules"
+ }, {
+ "fqsen": "\\chillerlan\\QRCode\\Output\\QROutputAbstract\u003A\u003AmoduleTransform\u0028\u0029",
+ "name": "moduleTransform",
+ "summary": "The\u0020transform\u0020callback\u0020for\u0020the\u0020module\u0020collector",
+ "url": "classes/chillerlan-QRCode-Output-QROutputAbstract.html#method_moduleTransform"
}, {
"fqsen": "\\chillerlan\\QRCode\\Output\\QROutputAbstract\u003A\u003A\u0024moduleCount",
"name": "moduleCount",