Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / consolidation / robo / src / Task / Docker / Stop.php
diff --git a/vendor/consolidation/robo/src/Task/Docker/Stop.php b/vendor/consolidation/robo/src/Task/Docker/Stop.php
new file mode 100644 (file)
index 0000000..4d0d436
--- /dev/null
@@ -0,0 +1,41 @@
+<?php
+namespace Robo\Task\Docker;
+
+/**
+ * Stops Docker container
+ *
+ * ```php
+ * <?php
+ * $this->taskDockerStop($cidOrResult)
+ *      ->run();
+ * ?>
+ * ```
+ */
+class Stop extends Base
+{
+    /**
+     * @var string
+     */
+    protected $command = "docker stop";
+
+    /**
+     * @var null|string
+     */
+    protected $cid;
+
+    /**
+     * @param string|\Robo\Task\Docker\Result $cidOrResult
+     */
+    public function __construct($cidOrResult)
+    {
+        $this->cid = $cidOrResult instanceof Result ? $cidOrResult->getCid() : $cidOrResult;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function getCommand()
+    {
+        return $this->command . ' ' . $this->arguments . ' ' . $this->cid;
+    }
+}