1
ZF2에서 콜백 유효성 검사기와 비슷한 콜백 필터에 폼 값 배열을 전달할 수 있습니까? ,젠드 프레임 워크 2 콜백 필터
//Validator callback works
'callback' => function($value, $context){
//$context contains form values
}
//Need similar functionality for filter
'callback' => function($value, $context){
//$context will issue a warning because its not set
}
//I know the following filter works, but I dont know how to pass the form
'callback' => function($value, $context){
print_r($context); //Prints 'hello world'
},
'options' => array(
'callback_params' => array(
'context' => 'hello world' //I need this to be the form values
)
)
에서 원시 형태로 값을 얻을 수 있습니다 질문 작성자가 제공 한 대답을 이해할 수 있도록 솔루션이 왜 작동하는지에 대한 설명과 함께 코드를 백업하십시오. –