]> _ Git - cubist_cms-back.git/commitdiff
wip #6772 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 6 Mar 2024 11:00:18 +0000 (12:00 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 6 Mar 2024 11:00:18 +0000 (12:00 +0100)
src/app/Jobs/CommandLine.php [new file with mode: 0644]

diff --git a/src/app/Jobs/CommandLine.php b/src/app/Jobs/CommandLine.php
new file mode 100644 (file)
index 0000000..2e4eb97
--- /dev/null
@@ -0,0 +1,22 @@
+<?php
+
+namespace Cubist\Backpack\Jobs;
+
+class CommandLine extends Base
+{
+    protected $_command;
+
+    public function __construct($command)
+    {
+        $this->_command = $command;
+    }
+
+    public function handle()
+    {
+        if (is_string($this->_command)) {
+            `$this->_command`;
+        } else if ($this->_command instanceof \Cubist\Util\CommandLine) {
+            $this->_command->execute();
+        }
+    }
+}