You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CommandsBusiness.php 510B

12345678910111213141516171819202122232425
  1. <?php
  2. namespace App\Http\Business;
  3. use App\Http\Business\Commands\AbstractCommand;
  4. use App\Http\DBO\CommandsDbo;
  5. use App\Http\DBO\CommandTypesDbo;
  6. /**
  7. * Created by PhpStorm.
  8. * User: robin
  9. * Date: 11/23/15
  10. * Time: 11:59 PM
  11. */
  12. class CommandsBusiness
  13. {
  14. public static function exec(CommandsDbo $command, CommandTypesDbo $type)
  15. {
  16. /**
  17. * @var $cmd AbstractCommand
  18. */
  19. $class = $type->getClass();
  20. $cmd = new $class($command);
  21. return $cmd->exec();
  22. }
  23. }