Cheetah
AbstractCommand.php
Go to the documentation of this file.
1 <?php
2 
4 
5 abstract class AbstractCommand
6 {
12  public $arguments;
13 
19  protected $output;
20 
27  abstract public function execute($image);
28 
34  public function __construct($arguments)
35  {
36  $this->arguments = $arguments;
37  }
38 
45  public function argument($key)
46  {
47  return new \Intervention\Image\Commands\Argument($this, $key);
48  }
49 
55  public function getOutput()
56  {
57  return $this->output ? $this->output : null;
58  }
59 
65  public function hasOutput()
66  {
67  return ! is_null($this->output);
68  }
69 
75  public function setOutput($value)
76  {
77  $this->output = $value;
78  }
79 }
Intervention\Image\Commands\AbstractCommand\execute
execute($image)
Intervention\Image\Commands\AbstractCommand\hasOutput
hasOutput()
Definition: AbstractCommand.php:65
Intervention\Image\Commands
Definition: AbstractCommand.php:3
php
Intervention\Image\Commands\AbstractCommand\__construct
__construct($arguments)
Definition: AbstractCommand.php:34
Intervention\Image\Commands\AbstractCommand\setOutput
setOutput($value)
Definition: AbstractCommand.php:75
Intervention\Image\Commands\AbstractCommand\$output
$output
Definition: AbstractCommand.php:19
Intervention\Image\Commands\AbstractCommand\argument
argument($key)
Definition: AbstractCommand.php:45
Intervention\Image\Commands\AbstractCommand
Definition: AbstractCommand.php:6
Intervention\Image\Commands\AbstractCommand\$arguments
$arguments
Definition: AbstractCommand.php:12
Intervention\Image\Commands\AbstractCommand\getOutput
getOutput()
Definition: AbstractCommand.php:55