1234567891011121314151617181920212223242526272829303132333435363738 |
- <?php
- /**
- * Created by PhpStorm.
- * User: robin
- * Date: 11/24/15
- * Time: 12:15 AM
- */
-
- namespace App\Http\Business\Commands;
-
- use App\Http\DBO\CommandsDbo;
-
- class MultipleCommand extends AbstractCommand
- {
- /**
- * @return bool
- */
- public function exec()
- {
- $data = $this->_command->getData();
-
- $commands = $data["Commands"];
-
- foreach ($commands as $command) {
- $type = $command["Type"];
- $data = $command["Data"];
- $class = "App\Http\Business\Commands\\" . $type . "Command";
-
- $commandDbo = new CommandsDbo();
- $commandDbo->setData($data);
-
- $cmd = new $class($commandDbo);
- $cmd->exec();
- }
-
- return true;
- }
- }
|