@@ -1117,14 +1117,4 @@ |
||
1117 | 1117 | )); |
1118 | 1118 | |
1119 | 1119 | if ($response->isNotModified($request)) { |
1120 | - return $response; |
|
1121 | - } |
|
1122 | - } |
|
1123 | - } |
|
1124 | - } |
|
1125 | - |
|
1126 | - }, -1024); |
|
1127 | - |
|
1128 | ->>>>>>> k-yamamura/feature-httpcache |
|
1129 | - } |
|
1130 | -} |
|
1120 | + return $response |
|
1131 | 1121 | \ No newline at end of file |
@@ -1117,14 +1117,4 @@ |
||
1117 | 1117 | )); |
1118 | 1118 | |
1119 | 1119 | if ($response->isNotModified($request)) { |
1120 | - return $response; |
|
1121 | - } |
|
1122 | - } |
|
1123 | - } |
|
1124 | - } |
|
1125 | - |
|
1126 | - }, -1024); |
|
1127 | - |
|
1128 | ->>>>>>> k-yamamura/feature-httpcache |
|
1129 | - } |
|
1130 | -} |
|
1120 | + return $response |
|
1131 | 1121 | \ No newline at end of file |
@@ -1117,14 +1117,4 @@ |
||
1117 | 1117 | )); |
1118 | 1118 | |
1119 | 1119 | if ($response->isNotModified($request)) { |
1120 | - return $response; |
|
1121 | - } |
|
1122 | - } |
|
1123 | - } |
|
1124 | - } |
|
1125 | - |
|
1126 | - }, -1024); |
|
1127 | - |
|
1128 | ->>>>>>> k-yamamura/feature-httpcache |
|
1129 | - } |
|
1130 | -} |
|
1120 | + return $response |
|
1131 | 1121 | \ No newline at end of file |
@@ -1117,14 +1117,4 @@ |
||
1117 | 1117 | )); |
1118 | 1118 | |
1119 | 1119 | if ($response->isNotModified($request)) { |
1120 | - return $response; |
|
1121 | - } |
|
1122 | - } |
|
1123 | - } |
|
1124 | - } |
|
1125 | - |
|
1126 | - }, -1024); |
|
1127 | - |
|
1128 | ->>>>>>> k-yamamura/feature-httpcache |
|
1129 | - } |
|
1130 | -} |
|
1120 | + return $response |
|
1131 | 1121 | \ No newline at end of file |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | public function initConfig() |
82 | 82 | { |
83 | 83 | // load config |
84 | - $this['config'] = $this->share(function () { |
|
84 | + $this['config'] = $this->share(function() { |
|
85 | 85 | $ymlPath = __DIR__.'/../../app/config/eccube'; |
86 | 86 | $distPath = __DIR__.'/../../src/Eccube/Resource/config'; |
87 | 87 | |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | $this->register(new \Eccube\ServiceProvider\ValidatorServiceProvider()); |
224 | 224 | |
225 | 225 | $app = $this; |
226 | - $this->error(function (\Exception $e, $code) use ($app) { |
|
226 | + $this->error(function(\Exception $e, $code) use ($app) { |
|
227 | 227 | if ($app['debug']) { |
228 | 228 | return; |
229 | 229 | } |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | $this->register(new \Silex\Provider\TranslationServiceProvider(), array( |
288 | 288 | 'locale' => $this['config']['locale'], |
289 | 289 | )); |
290 | - $this['translator'] = $this->share($this->extend('translator', function ($translator, \Silex\Application $app) { |
|
290 | + $this['translator'] = $this->share($this->extend('translator', function($translator, \Silex\Application $app) { |
|
291 | 291 | $translator->addLoader('yaml', new \Symfony\Component\Translation\Loader\YamlFileLoader()); |
292 | 292 | |
293 | 293 | $r = new \ReflectionClass('Symfony\Component\Validator\Validator'); |
@@ -331,16 +331,16 @@ discard block |
||
331 | 331 | $this->register(new \Silex\Provider\TwigServiceProvider(), array( |
332 | 332 | 'twig.form.templates' => array('Form/form_layout.twig'), |
333 | 333 | )); |
334 | - $this['twig'] = $this->share($this->extend('twig', function (\Twig_Environment $twig, \Silex\Application $app) { |
|
334 | + $this['twig'] = $this->share($this->extend('twig', function(\Twig_Environment $twig, \Silex\Application $app) { |
|
335 | 335 | $twig->addExtension(new \Eccube\Twig\Extension\EccubeExtension($app)); |
336 | 336 | $twig->addExtension(new \Twig_Extension_StringLoader()); |
337 | 337 | |
338 | 338 | return $twig; |
339 | 339 | })); |
340 | 340 | |
341 | - $this->before(function (Request $request, \Silex\Application $app) { |
|
341 | + $this->before(function(Request $request, \Silex\Application $app) { |
|
342 | 342 | // フロント or 管理画面ごとにtwigの探索パスを切り替える. |
343 | - $app['twig'] = $app->share($app->extend('twig', function (\Twig_Environment $twig, \Silex\Application $app) { |
|
343 | + $app['twig'] = $app->share($app->extend('twig', function(\Twig_Environment $twig, \Silex\Application $app) { |
|
344 | 344 | $paths = array(); |
345 | 345 | |
346 | 346 | // 互換性がないのでprofiler とproduction 時のcacheを分離する |
@@ -392,7 +392,7 @@ discard block |
||
392 | 392 | |
393 | 393 | // twigのグローバル変数を定義. |
394 | 394 | $app = $this; |
395 | - $this->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function (\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) use ($app) { |
|
395 | + $this->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function(\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) use ($app) { |
|
396 | 396 | // ショップ基本情報 |
397 | 397 | $BaseInfo = $app['eccube.repository.base_info']->get(); |
398 | 398 | $app['twig']->addGlobal('BaseInfo', $BaseInfo); |
@@ -452,7 +452,7 @@ discard block |
||
452 | 452 | // メール送信時の文字エンコード指定(デフォルトはUTF-8) |
453 | 453 | if (isset($this['config']['mail']['charset_iso_2022_jp']) && is_bool($this['config']['mail']['charset_iso_2022_jp'])) { |
454 | 454 | if ($this['config']['mail']['charset_iso_2022_jp'] === true) { |
455 | - \Swift::init(function () { |
|
455 | + \Swift::init(function() { |
|
456 | 456 | \Swift_DependencyContainer::getInstance() |
457 | 457 | ->register('mime.qpheaderencoder') |
458 | 458 | ->asAliasOf('mime.base64headerencoder'); |
@@ -618,19 +618,19 @@ discard block |
||
618 | 618 | array('^/mypage', 'ROLE_USER'), |
619 | 619 | ); |
620 | 620 | |
621 | - $this['eccube.password_encoder'] = $this->share(function ($app) { |
|
621 | + $this['eccube.password_encoder'] = $this->share(function($app) { |
|
622 | 622 | return new \Eccube\Security\Core\Encoder\PasswordEncoder($app['config']); |
623 | 623 | }); |
624 | - $this['security.encoder_factory'] = $this->share(function ($app) { |
|
624 | + $this['security.encoder_factory'] = $this->share(function($app) { |
|
625 | 625 | return new \Symfony\Component\Security\Core\Encoder\EncoderFactory(array( |
626 | 626 | 'Eccube\Entity\Customer' => $app['eccube.password_encoder'], |
627 | 627 | 'Eccube\Entity\Member' => $app['eccube.password_encoder'], |
628 | 628 | )); |
629 | 629 | }); |
630 | - $this['eccube.event_listner.security'] = $this->share(function ($app) { |
|
630 | + $this['eccube.event_listner.security'] = $this->share(function($app) { |
|
631 | 631 | return new \Eccube\EventListener\SecurityEventListener($app['orm.em']); |
632 | 632 | }); |
633 | - $this['user'] = function ($app) { |
|
633 | + $this['user'] = function($app) { |
|
634 | 634 | $token = $app['security']->getToken(); |
635 | 635 | |
636 | 636 | return ($token !== null) ? $token->getUser() : null; |
@@ -641,17 +641,17 @@ discard block |
||
641 | 641 | |
642 | 642 | // Voterの設定 |
643 | 643 | $app = $this; |
644 | - $this['authority_voter'] = $this->share(function ($app) { |
|
644 | + $this['authority_voter'] = $this->share(function($app) { |
|
645 | 645 | return new \Eccube\Security\Voter\AuthorityVoter($app); |
646 | 646 | }); |
647 | 647 | |
648 | - $app['security.voters'] = $app->extend('security.voters', function ($voters) use ($app) { |
|
648 | + $app['security.voters'] = $app->extend('security.voters', function($voters) use ($app) { |
|
649 | 649 | $voters[] = $app['authority_voter']; |
650 | 650 | |
651 | 651 | return $voters; |
652 | 652 | }); |
653 | 653 | |
654 | - $this['security.access_manager'] = $this->share(function ($app) { |
|
654 | + $this['security.access_manager'] = $this->share(function($app) { |
|
655 | 655 | return new \Symfony\Component\Security\Core\Authorization\AccessDecisionManager($app['security.voters'], 'unanimous'); |
656 | 656 | }); |
657 | 657 | |
@@ -675,14 +675,14 @@ discard block |
||
675 | 675 | public function initPluginEventDispatcher() |
676 | 676 | { |
677 | 677 | // EventDispatcher |
678 | - $this['eccube.event.dispatcher'] = $this->share(function () { |
|
678 | + $this['eccube.event.dispatcher'] = $this->share(function() { |
|
679 | 679 | return new EventDispatcher(); |
680 | 680 | }); |
681 | 681 | |
682 | 682 | $app = $this; |
683 | 683 | |
684 | 684 | // hook point |
685 | - $this->on(KernelEvents::REQUEST, function (GetResponseEvent $event) use ($app) { |
|
685 | + $this->on(KernelEvents::REQUEST, function(GetResponseEvent $event) use ($app) { |
|
686 | 686 | if (!$event->isMasterRequest()) { |
687 | 687 | return; |
688 | 688 | } |
@@ -690,7 +690,7 @@ discard block |
||
690 | 690 | $app['eccube.event.dispatcher']->dispatch($hookpoint, $event); |
691 | 691 | }, self::EARLY_EVENT); |
692 | 692 | |
693 | - $this->on(KernelEvents::REQUEST, function (GetResponseEvent $event) use ($app) { |
|
693 | + $this->on(KernelEvents::REQUEST, function(GetResponseEvent $event) use ($app) { |
|
694 | 694 | if (!$event->isMasterRequest()) { |
695 | 695 | return; |
696 | 696 | } |
@@ -699,7 +699,7 @@ discard block |
||
699 | 699 | $app['eccube.event.dispatcher']->dispatch($hookpoint, $event); |
700 | 700 | }); |
701 | 701 | |
702 | - $this->on(KernelEvents::RESPONSE, function (FilterResponseEvent $event) use ($app) { |
|
702 | + $this->on(KernelEvents::RESPONSE, function(FilterResponseEvent $event) use ($app) { |
|
703 | 703 | if (!$event->isMasterRequest()) { |
704 | 704 | return; |
705 | 705 | } |
@@ -708,7 +708,7 @@ discard block |
||
708 | 708 | $app['eccube.event.dispatcher']->dispatch($hookpoint, $event); |
709 | 709 | }); |
710 | 710 | |
711 | - $this->on(KernelEvents::RESPONSE, function (FilterResponseEvent $event) use ($app) { |
|
711 | + $this->on(KernelEvents::RESPONSE, function(FilterResponseEvent $event) use ($app) { |
|
712 | 712 | if (!$event->isMasterRequest()) { |
713 | 713 | return; |
714 | 714 | } |
@@ -716,19 +716,19 @@ discard block |
||
716 | 716 | $app['eccube.event.dispatcher']->dispatch($hookpoint, $event); |
717 | 717 | }, self::LATE_EVENT); |
718 | 718 | |
719 | - $this->on(KernelEvents::TERMINATE, function (PostResponseEvent $event) use ($app) { |
|
719 | + $this->on(KernelEvents::TERMINATE, function(PostResponseEvent $event) use ($app) { |
|
720 | 720 | $route = $event->getRequest()->attributes->get('_route'); |
721 | 721 | $hookpoint = "eccube.event.controller.$route.finish"; |
722 | 722 | $app['eccube.event.dispatcher']->dispatch($hookpoint, $event); |
723 | 723 | }); |
724 | 724 | |
725 | - $this->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function (\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) { |
|
725 | + $this->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function(\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) { |
|
726 | 726 | $route = $event->getRequest()->attributes->get('_route'); |
727 | 727 | $app['eccube.event.dispatcher']->dispatch('eccube.event.render.'.$route.'.before', $event); |
728 | 728 | }); |
729 | 729 | |
730 | 730 | // Request Event |
731 | - $this->on(\Symfony\Component\HttpKernel\KernelEvents::REQUEST, function (\Symfony\Component\HttpKernel\Event\GetResponseEvent $event) use ($app) { |
|
731 | + $this->on(\Symfony\Component\HttpKernel\KernelEvents::REQUEST, function(\Symfony\Component\HttpKernel\Event\GetResponseEvent $event) use ($app) { |
|
732 | 732 | |
733 | 733 | if (\Symfony\Component\HttpKernel\HttpKernelInterface::MASTER_REQUEST !== $event->getRequestType()) { |
734 | 734 | return; |
@@ -759,7 +759,7 @@ discard block |
||
759 | 759 | }, 30); // Routing(32)が解決しし, 認証判定(8)が実行される前のタイミング. |
760 | 760 | |
761 | 761 | // Controller Event |
762 | - $this->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function (\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) use ($app) { |
|
762 | + $this->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function(\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) use ($app) { |
|
763 | 763 | |
764 | 764 | if (\Symfony\Component\HttpKernel\HttpKernelInterface::MASTER_REQUEST !== $event->getRequestType()) { |
765 | 765 | return; |
@@ -790,7 +790,7 @@ discard block |
||
790 | 790 | }); |
791 | 791 | |
792 | 792 | // Response Event |
793 | - $this->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function (\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) { |
|
793 | + $this->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function(\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) { |
|
794 | 794 | |
795 | 795 | if (\Symfony\Component\HttpKernel\HttpKernelInterface::MASTER_REQUEST !== $event->getRequestType()) { |
796 | 796 | return; |
@@ -820,7 +820,7 @@ discard block |
||
820 | 820 | }); |
821 | 821 | |
822 | 822 | // Exception Event |
823 | - $this->on(\Symfony\Component\HttpKernel\KernelEvents::EXCEPTION, function (\Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent $event) use ($app) { |
|
823 | + $this->on(\Symfony\Component\HttpKernel\KernelEvents::EXCEPTION, function(\Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent $event) use ($app) { |
|
824 | 824 | |
825 | 825 | if (\Symfony\Component\HttpKernel\HttpKernelInterface::MASTER_REQUEST !== $event->getRequestType()) { |
826 | 826 | return; |
@@ -850,7 +850,7 @@ discard block |
||
850 | 850 | }); |
851 | 851 | |
852 | 852 | // Terminate Event |
853 | - $this->on(\Symfony\Component\HttpKernel\KernelEvents::TERMINATE, function (\Symfony\Component\HttpKernel\Event\PostResponseEvent $event) use ($app) { |
|
853 | + $this->on(\Symfony\Component\HttpKernel\KernelEvents::TERMINATE, function(\Symfony\Component\HttpKernel\Event\PostResponseEvent $event) use ($app) { |
|
854 | 854 | |
855 | 855 | $route = $event->getRequest()->attributes->get('_route'); |
856 | 856 | |
@@ -929,7 +929,7 @@ discard block |
||
929 | 929 | |
930 | 930 | // const |
931 | 931 | if (isset($config['const'])) { |
932 | - $this['config'] = $this->share($this->extend('config', function ($eccubeConfig) use ($config) { |
|
932 | + $this['config'] = $this->share($this->extend('config', function($eccubeConfig) use ($config) { |
|
933 | 933 | $eccubeConfig[$config['code']] = array( |
934 | 934 | 'const' => $config['const'], |
935 | 935 | ); |
@@ -1045,7 +1045,7 @@ discard block |
||
1045 | 1045 | return true; |
1046 | 1046 | } |
1047 | 1047 | |
1048 | -<<<<<<< HEAD |
|
1048 | +<< << <<< HEAD |
|
1049 | 1049 | /** |
1050 | 1050 | * セッションが開始されているかどうか. |
1051 | 1051 | * |
@@ -1117,14 +1117,4 @@ discard block |
||
1117 | 1117 | )); |
1118 | 1118 | |
1119 | 1119 | if ($response->isNotModified($request)) { |
1120 | - return $response; |
|
1121 | - } |
|
1122 | - } |
|
1123 | - } |
|
1124 | - } |
|
1125 | - |
|
1126 | - }, -1024); |
|
1127 | - |
|
1128 | ->>>>>>> k-yamamura/feature-httpcache |
|
1129 | - } |
|
1130 | -} |
|
1120 | + return $response |
|
1131 | 1121 | \ No newline at end of file |
@@ -1117,14 +1117,4 @@ |
||
1117 | 1117 | )); |
1118 | 1118 | |
1119 | 1119 | if ($response->isNotModified($request)) { |
1120 | - return $response; |
|
1121 | - } |
|
1122 | - } |
|
1123 | - } |
|
1124 | - } |
|
1125 | - |
|
1126 | - }, -1024); |
|
1127 | - |
|
1128 | ->>>>>>> k-yamamura/feature-httpcache |
|
1129 | - } |
|
1130 | -} |
|
1120 | + return $response |
|
1131 | 1121 | \ No newline at end of file |
@@ -1117,14 +1117,4 @@ |
||
1117 | 1117 | )); |
1118 | 1118 | |
1119 | 1119 | if ($response->isNotModified($request)) { |
1120 | - return $response; |
|
1121 | - } |
|
1122 | - } |
|
1123 | - } |
|
1124 | - } |
|
1125 | - |
|
1126 | - }, -1024); |
|
1127 | - |
|
1128 | ->>>>>>> k-yamamura/feature-httpcache |
|
1129 | - } |
|
1130 | -} |
|
1120 | + return $response |
|
1131 | 1121 | \ No newline at end of file |