Ejemplo n.º 1
0
 /**
  * @param OpenAccountCommand $command
  * @return void
  */
 public function handle($command)
 {
     $account = Account::open($command->getService(), $command->getAccountNumber(), $command->getRecurringCharge(), $command->getDateOpened(), $command->getBillingPeriod());
     $this->accountRepository->save($account);
     $this->dispatch('account.opened', new AccountWasOpenedEvent($account));
 }
Ejemplo n.º 2
0
 /**
  * @return Response
  */
 public function indexAction()
 {
     $accounts = $this->accountRepository->findAll();
     $upcomingBills = $this->billRepository->findBillsDue(new \DateInterval('P1M'));
     return new Response($this->templating->render('@HCLabsBills/Dashboard/index.html.twig', ['accounts' => $accounts, 'upcoming_bills' => $upcomingBills]));
 }