Ferreteria/v0.6/clade/Sys/FileSys/Aspect/InOut/Fi/@code/2025/12/23
Jump to navigation
Jump to search
| 2025/12/22 | 2025/12/23 | 2025/12/24 |
old multi-type-accepting version
#
public function Mode(ModeIface|string|array $m=NULL) : ModeIface {
if (is_null($m)) {
// check existing mode
$om = $this->oMode;
if (is_null($om)) {
// is not set -- create a blank one (or should we error here?)
$om = new ModeClass;
$this->oMode = $om;
}
} elseif (is_object($m)) {
$om = $this->oMode = $m;
} elseif (is_string($m)) {
$om = $this->oMode = ModeClass($m);
$this->AmHere("MODE STRING [$m] -> [".$om->NativeString().']');
} elseif (is_array($m)) {
$om = $this->oMode = new ModeClass($m);
}
return $om;
}