PluginProbe
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell / 3.13.1
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell v3.13.1
3.13.1 3.13.0 3.12.13 3.12.12 3.12.11 3.12.10 3.12.9 3.12.8 3.12.7 3.12.6 3.12.5 3.12.4 3.12.3 3.12.1 3.12.2 3.12.0 3.11.1 3.11.0 3.10.9 3.10.8 3.10.7 3.10.6 2.8.16 2.8.17 2.8.18 All 259 releases
wpfunnels / vendor / intervention / image / src / Intervention / Image / Commands / AbstractCommand.php

AbstractCommand.php in WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell 3.13.1, at vendor/intervention/image/src/Intervention/Image/Commands/AbstractCommand.php

82 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Intervention\Image\Commands;
4
5 use Intervention\Image\Commands\Argument;
6
7 abstract class AbstractCommand
8 {
9 /**
10 * Arguments of command
11 *
12 * @var array
13 */
14 public $arguments;
15
16 /**
17 * Output of command
18 *
19 * @var mixed
20 */
21 protected $output;
22
23 /**
24 * Executes current command on given image
25 *
26 * @param \Intervention\Image\Image $image
27 * @return mixed
28 */
29 abstract public function execute($image);
30
31 /**
32 * Creates new command instance
33 *
34 * @param array $arguments
35 */
36 public function __construct($arguments)
37 {
38 $this->arguments = $arguments;
39 }
40
41 /**
42 * Creates new argument instance from given argument key
43 *
44 * @param int $key
45 * @return \Intervention\Image\Commands\Argument
46 */
47 public function argument($key)
48 {
49 return new Argument($this, $key);
50 }
51
52 /**
53 * Returns output data of current command
54 *
55 * @return mixed
56 */
57 public function getOutput()
58 {
59 return $this->output ? $this->output : null;
60 }
61
62 /**
63 * Determines if current instance has output data
64 *
65 * @return boolean
66 */
67 public function hasOutput()
68 {
69 return ! is_null($this->output);
70 }
71
72 /**
73 * Sets output data of current command
74 *
75 * @param mixed $value
76 */
77 public function setOutput($value)
78 {
79 $this->output = $value;
80 }
81 }
82