commandsRun[] = $cmd; } public function flushCommands() { $out = $this->commandsRun; $this->commandsRun = []; return $out; } }