Improvements
This commit is contained in:
1 parent
e6f6fbe3d3
commit
0c64bc2f70
5 files changed
+152
-71
No files matched your search
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace NoccyLabs\Shell;
|
||||
|
||||
use NoccyLabs\Shell\LineRead;
|
||||
|
||||
abstract class Command
|
||||
{
|
||||
|
||||
protected $name;
|
||||
|
||||
protected $deescription;
|
||||
|
||||
protected $shell;
|
||||
|
||||
public function setShell(Shell $shell)
|
||||
{
|
||||
$this->shell = $shell;
|
||||
}
|
||||
|
||||
protected function writeln($str)
|
||||
{
|
||||
$this->shell->writeln($str);
|
||||
}
|
||||
|
||||
abstract public function getName();
|
||||
|
||||
public function getDescription()
|
||||
{}
|
||||
|
||||
public function getHelp()
|
||||
{}
|
||||
|
||||
public function run(array $args)
|
||||
{
|
||||
call_user_func_array([$this,"execute"], $args);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user