| @@ 33-58 (lines=26) @@ | ||
| 30 | */ |
|
| 31 | protected $options; |
|
| 32 | ||
| 33 | public static function cronMail() |
|
| 34 | { |
|
| 35 | $configuration = require 'config/application.config.php'; |
|
| 36 | $smConfig = isset($configuration['service_manager']) ? $configuration['service_manager'] : array(); |
|
| 37 | $sm = new \Zend\ServiceManager\ServiceManager(new \Zend\Mvc\Service\ServiceManagerConfig($smConfig)); |
|
| 38 | $sm->setService('ApplicationConfig', $configuration); |
|
| 39 | $sm->get('ModuleManager')->loadModules(); |
|
| 40 | $sm->get('Application')->bootstrap(); |
|
| 41 | ||
| 42 | $mailService = $sm->get('playgrounduser_message'); |
|
| 43 | $gameService = $sm->get('playgroundgame_quiz_service'); |
|
| 44 | ||
| 45 | $from = "[email protected]"; |
|
| 46 | $subject = "sujet game"; |
|
| 47 | ||
| 48 | $to = "[email protected]"; |
|
| 49 | ||
| 50 | $game = $gameService->checkGame('qooqo'); |
|
| 51 | ||
| 52 | // On recherche les joueurs qui n'ont pas partagé leur qquiz après avoir joué |
|
| 53 | // entry join user join game : distinct user et game et game_entry = 0 et updated_at <= jour-1 et > jour - 2 |
|
| 54 | ||
| 55 | $message = $mailService->createTextMessage($from, $to, $subject, 'playground-game/email/share_reminder', array('game' => $game)); |
|
| 56 | ||
| 57 | $mailService->send($message); |
|
| 58 | } |
|
| 59 | ||
| 60 | public static function instantWinEmail() |
|
| 61 | { |
|
| @@ 1420-1444 (lines=25) @@ | ||
| 1417 | return false; |
|
| 1418 | } |
|
| 1419 | ||
| 1420 | public static function cronMail() |
|
| 1421 | { |
|
| 1422 | $configuration = require 'config/application.config.php'; |
|
| 1423 | $smConfig = isset($configuration['service_manager']) ? $configuration['service_manager'] : array(); |
|
| 1424 | $sm = new \Zend\ServiceManager\ServiceManager(new \Zend\Mvc\Service\ServiceManagerConfig($smConfig)); |
|
| 1425 | $sm->setService('ApplicationConfig', $configuration); |
|
| 1426 | $sm->get('ModuleManager')->loadModules(); |
|
| 1427 | $sm->get('Application')->bootstrap(); |
|
| 1428 | ||
| 1429 | $mailService = $sm->get('playgrounduser_message'); |
|
| 1430 | $gameService = $sm->get('playgroundgame_quiz_service'); |
|
| 1431 | ||
| 1432 | $from = "[email protected]"; |
|
| 1433 | $subject = "sujet game"; |
|
| 1434 | ||
| 1435 | $to = "[email protected]"; |
|
| 1436 | ||
| 1437 | $game = $gameService->checkGame('qooqo'); |
|
| 1438 | ||
| 1439 | $message = $mailService->createTextMessage($from, $to, $subject, 'playground-game/email/share_reminder', array( |
|
| 1440 | 'game' => $game |
|
| 1441 | )); |
|
| 1442 | ||
| 1443 | $mailService->send($message); |
|
| 1444 | } |
|
| 1445 | ||
| 1446 | /** |
|
| 1447 | * @param string $path |
|