2013-03-14 2 views
1
'login' => array(
    'type' => 'Literal', 
    'options' => array(
     'route' => '/giris', 
     'defaults' => array(
      'controller' => 'zfcuser', 
      'action'  => 'login', 
     ), 
    ), 
    'may_terminate' => true, 
    'child_routes' => array(
     'provider' => array(
      'type' => 'Segment', 
      'options' => array(
       'route' => '/:provider', 
       'constraints' => array(
        'provider' => '[a-zA-Z][a-zA-Z0-9_-]+', 
       ), 
       'defaults' => array(
        'controller' => 'ScnSocialAuth-User', 
        'action' => 'provider-login', 
       ), 
      ), 
     ), 
     'query' => array(
      'type' => 'Query', 
     ), 
    ), 
), 

메시지 표시 ZF 2.1.4부터는 쿼리 경로가 지원되지 않습니다. 대신 /opt/lampp/KendindenApp/vendor/zendframework/zendframework/library/Zend/Mvc/Router/Http/Query.php 21 행의 "query"옵션을 사용하십시오.Zendfamework 2.1.4에서 쿼리가 지원되지 않습니다.

잘 작동합니다 이 줄을 지울 때.

'query' => array(
    'type' => 'Query', 
), 
+0

답변 됨 http://stackoverflow.com/questions/12785190/how-can-you-add-query-parameters-in-the-zf2-url-view-helper/15422349#를 참조하십시오. 15422349 – dVaffection

답변

3

보안상의 이유로 ZF 2.1.4에서 쿼리 경로가 더 이상 사용되지 않습니다. 자세한 내용은 http://framework.zend.com/security/advisory/ZF2013-01

+0

도움 주셔서 감사합니다. –

+1

멋지다 (더 이상 지원되지 않음).하지만 이제 경로 구성을 통해 쿼리 매개 변수에 대한 제약 조건 및 기본값을 설정하는 방법은 무엇입니까? – elydelacruz

+0

이 경우 경로 구성에서 유형을 세그먼트로 정의 할 수 있습니다. [http://framework.zend.com/manual/2.0/en/modules/zend.mvc.routing.html#zend-mvc-router-http-segment](http://framework.zend.com/manual) /2.0/en/modules/zend.mvc.routing.html#zend-mvc-router-http-segment) –

관련 문제