where should i define filter functions for router?

thcom
Backer | 94
+
0
-

hi, i try to learn about rountig
everything is ok but have only one problem

where should i define the filter functions filterInFunc and filterOutFunc

<?php

$route = new Route('<presenter>/<action>/<id>', [
	'presenter' => [
		Route::VALUE => 'Homepage',
		Route::FILTER_IN => 'filterInFunc',
		Route::FILTER_OUT => 'filterOutFunc',
	],
	'action' => 'default',
	'id' => null,
]);

?>

thank you !

CZechBoY
Member | 3608
+
0
-

You can define anonymous function or where you want… only restriction is that the function must be callable.

thcom
Backer | 94
+
0
-

great !!

i found solutuion here

https://forum.nette.org/…zi-v-routeru

answer for my second question about database in router too

many thanks !!!