public function execute() { if (!file_exists($this->overlay)) { throw new \Exception('Overlay image not found.'); } if (!file_exists($this->base)) { throw new \Exception('Base image not found.'); } $results = array(); $command = Composite::prepareCommandString(); echo 'Executing command: ' . $command; exec($command, $results); $this->executed = true; //parse results for errors/success return $results; }