Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

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. }