:octocat: clarify default module value setting

This commit is contained in:
codemasher
2021-12-11 17:52:22 +01:00
parent 709a0322c9
commit 3e14260144
7 changed files with 137 additions and 80 deletions
+29 -7
View File
@@ -14,20 +14,42 @@ use chillerlan\QRCode\Output\QROutputAbstract;
class MyCustomOutput extends QROutputAbstract{
protected function setModuleValues():void{
// TODO: Implement setModuleValues() method.
/**
* @inheritDoc
*/
protected function moduleValueIsValid($value):bool{
// TODO: Implement moduleValueIsValid() method. (abstract)
return false;
}
public function dump(string $file = null):string{
/**
* @inheritDoc
*/
protected function getModuleValue($value){
// TODO: Implement getModuleValue() method. (abstract)
return null;
}
/**
* @inheritDoc
*/
protected function getDefaultModuleValue(bool $isDark){
// TODO: Implement getDefaultModuleValue() method. (abstract)
return null;
}
/**
* @inheritDoc
*/
public function dump(string $file = null):string{
$output = '';
for($row = 0; $row < $this->moduleCount; $row++){
for($col = 0; $col < $this->moduleCount; $col++){
$output .= (int)$this->matrix->check($col, $row);
for($y = 0; $y < $this->moduleCount; $y++){
for($x = 0; $x < $this->moduleCount; $x++){
$output .= (int)$this->matrix->check($x, $y);
}
$output .= \PHP_EOL;
$output .= $this->options->eol;
}
return $output;