@@ -69,18 +69,18 @@ |
||
69 | 69 | \Aimeos\Controller\Jobs::create( $context, $aimeos, $jobname )->run(); |
70 | 70 | |
71 | 71 | $container = $this->getContainer(); |
72 | - $mailers = array_keys($container->getParameter('swiftmailer.mailers')); |
|
73 | - foreach ($mailers as $name) { |
|
74 | - if (method_exists($container, 'initialized') ? $container->initialized(sprintf('swiftmailer.mailer.%s', $name)) : true) { |
|
75 | - if ($container->getParameter(sprintf('swiftmailer.mailer.%s.spool.enabled', $name))) { |
|
76 | - $mailer = $container->get(sprintf('swiftmailer.mailer.%s', $name)); |
|
72 | + $mailers = array_keys( $container->getParameter( 'swiftmailer.mailers' ) ); |
|
73 | + foreach( $mailers as $name ) { |
|
74 | + if( method_exists( $container, 'initialized' ) ? $container->initialized( sprintf( 'swiftmailer.mailer.%s', $name ) ) : true ) { |
|
75 | + if( $container->getParameter( sprintf( 'swiftmailer.mailer.%s.spool.enabled', $name ) ) ) { |
|
76 | + $mailer = $container->get( sprintf( 'swiftmailer.mailer.%s', $name ) ); |
|
77 | 77 | $transport = $mailer->getTransport(); |
78 | - if ($transport instanceof \Swift_Transport_SpoolTransport) { |
|
78 | + if( $transport instanceof \Swift_Transport_SpoolTransport ) { |
|
79 | 79 | $spool = $transport->getSpool(); |
80 | - if ($spool instanceof \Swift_MemorySpool) { |
|
80 | + if( $spool instanceof \Swift_MemorySpool ) { |
|
81 | 81 | $output->writeln( sprintf( 'Flushing queue "<info>%s</info>"', $name ) ); |
82 | 82 | // may throw |
83 | - $spool->flushQueue($container->get(sprintf('swiftmailer.mailer.%s.transport.real', $name))); |
|
83 | + $spool->flushQueue( $container->get( sprintf( 'swiftmailer.mailer.%s.transport.real', $name ) ) ); |
|
84 | 84 | } |
85 | 85 | } |
86 | 86 | } |