0
메서드 이름 또는 authentification
메서드에서 호출 된 URL을 silex 클래스에서 검색하려고합니다. Silex에서 호출 된 메서드를 확인하는 방법
$controllers->get('/list/reviews/', array($this, 'actionAllReviews'))
->before(array($this, 'controlerAuthentification'));
합니다. 내 경우에는 actionAllReviews
또는 /list/reviews/
입니다.
public function controlerAuthentification(Request $request, Application $app)
{
if(!$this->getClient()){
$app->abort(404,'Wrong client informations');
}
//How can I get the information here ?
}
감사합니다. 그것의 작동! – KubiRoazhon