Ferreteria/v0.6/clade/IO/Aspect/Connx/Stream/Runner/@fx/DoCommand
< Ferreteria | v0.6 | clade | IO | Aspect | Connx | Stream | Runner(Redirected from Ferreteria/v0.6/clade/IO/Aspect/Connx/Plug/Shell/@fx/DoCommand)
Jump to navigation
Jump to search
About
- Definition:
public function DoCommand(CmdLineIface $oCmd) : CommOpIface - Action: Creates a Process to execute a command, then Runs it.
History
- 2024-11-24 created. This is experimental; if it works,
- 2024-11-25 moved from shell/Secure to Shell
- 2025-03-21 moved core code from Shell to Process::Run(); this now calls that.
- 2025-12-24 We now have the requested OpIface copy whatever comes from Proc->Run() so we can be sure it's the class the caller needs.
- xTODO: Maybe the caller should do this check, since they think it's so bloody important...
- 2025-12-28 removing the optional
$oActparam and just returning whatRun()returns, because it has specific important info in it- (This satisfies the 12/24 xTODO.)
- 2026-01-20 commented out, with the note "should this even be implemented here?"
- 2026-01-31
- determined that the answer is "yes"
- renamed
ShelltoRunner
Code: current
As of 2026-01-31 (probably needs revision -- actual execution should be implemented in a podling):
#
public function DoCommand(CmdLineIface $oCmd) : ResultIface {
$oProc = $this->OProcess();
$oProc->RunCommand($oCmd);
return $oProc->OResult();
}
Code: removed
2026-01-17
#
// 2026-01-11 old API
public function DoCommand(CmdLineIface $oCmd, StreamIface $oResps) : CommOpIface {
$oProc = ProcClass::FromCommand($oCmd);
$oProc->RecverStream($oResps);
$oAct = $oProc->Run($oCmd);
$oProc->SetOpStator($oAct);
return $oAct;
}