Ferreteria/v0.6/clade/IO/Aspect/Connx/Plug/Shell: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{page/clade/v2 |fam= {{!}} align=right {{!}} {{l/ver/clade|IO\Aspect\Connx|Plug}} {{!}} align=center {{!}} → {{l/ver/clade|IO\Aspect\Connx\Plug|Shell}} → {{!}} align=left {{!}} {{l/ver/clade|IO\Aspect\Connx\Plug\Shell|Local}}<br> {{l/ver/clade|IO\Aspect\Connx\Plug\Shell|Remote}} |alia= {{!-!}} '''BufferIface''' {{!!}} {{l/ver/clade/full|p=ferreteria|IO\Aspect\Connx|Buffer}} {{!-!}} '''MemBuffClass''' {{!!}} {{l/ver/clade/full|p=ferreteria|IO\Aspect\Connx\Buf...") |
No edit summary |
||
| Line 14: | Line 14: | ||
{{!-!}} '''SelfIface''' {{!!}} {{l/ver/clade/full|p=ferreteria|IO\Aspect\Connx\Plug|Shell}} | {{!-!}} '''SelfIface''' {{!!}} {{l/ver/clade/full|p=ferreteria|IO\Aspect\Connx\Plug|Shell}} | ||
}} | }} | ||
==Pages== | |||
* {{l/sub|@removed}} | |||
==Code== | ==Code== | ||
''as of 2025-10-31'' | ''as of 2025-10-31'' | ||
Revision as of 14:13, 31 October 2025
| ||||||||||||||||||||||
Pages
Code
as of 2025-10-31
interface iShell extends BaseIface {
// LIFECYCLE
function Open() : ActionIface;
function Shut() : ActionIface;
// OUTPUT
#{I} function DescribeInline() : string;
}
abstract class caShell extends BaseClass implements SelfIface {
// ++ OBJECTS ++ //
protected function NewAction() : ActionIface { return new ($this->ActionClass()); }
// -- OBJECTS -- //
// ++ ACTION ++ //
/**
* ACTION: Sends a command, buffers the response, closes the command process
* HISTORY:
* 2024-11-24 created. This is experimental; if it works,
* this kind of thing should probably be encapsulated in its own class.
* 2024-11-25 moved from shell/Secure to Shell
* 2025-03-21 moved core code from Shell to Process::Run(); this now calls that.
*/
public function DoCommand(string|array $saCmd, BufferIface $oBuff, ?CommOpIface $oAct=NULL) : CommOpIface {
$oProc = ProcClass::FromCommand($saCmd);
$oProc->SetRecvBuff($oBuff);
if (is_null($oAct)) {
$oAct = $this->NewAction();
}
$oProc->SetOpStator($oAct);
return $oProc->Run();
}
public function OpenProcess(string|array $saCmd) : ProcIface {
$oProc = ProcClass::FromCommand($saCmd);
$oAct = $this->NewAction();
$oProc->SetOpStator($oAct);
return $oProc;
}
// -- ACTION -- //
}