Add __toString function for debugging purpose

Improve DBG tools: print out or return a string
This commit is contained in:
sparkyx 2022-11-19 18:27:45 +01:00
parent 5152ceeab7
commit 0fbc7bfdfa
5 changed files with 162 additions and 24 deletions

View file

@ -47,6 +47,21 @@ class Periode
$this->jrn_def_id=0;
}
public function __toString(): string
{
$r=<<<EOF
Object Periode [
\$jrn_def_id=>$jrn_def_id,
\$p_id=>$p_id,
\$status => $status,
\$p_start => $p_start,
\$p_end => $p_end,
]
EOF;
return $r;
}
function set_ledger($p_jrn)
{
$this->jrn_def_id=$p_jrn;