src/routing.php
protected function find_handler_path($filename) {
	$filename = strtolower($filename);
	
	if (preg_match('{[^a-z0-9/_-]}', $filename)) {
		return false;
	}
	
	$base_path = \alsvanzelf\fem\ROOT_DIR_APP.$this->handler_base_path.'/';
	$full_path = $base_path.$filename.'.php';
	if (file_exists($full_path) == false) {
		return false;
	}
	
	// sanity check to prevent escaping outside the base dir
	if (strpos($full_path, $base_path) !== 0) {
		return false;
	}
	
	return $full_path;
}
protected function find_handler_path($filename) {
	$filename = strtolower($filename);
	
	if (preg_match('{[^a-z0-9/_-]}', $filename)) {
		return false;
	}
	
	$base_path = \alsvanzelf\fem\ROOT_DIR_APP.$this->handler_base_path.'/';
	$full_path = $base_path.$filename.'.php';
	if (file_exists($full_path) == false) {
		return false;
	}
	
	// sanity check to prevent escaping outside the base dir
	if (strpos($full_path, $base_path) !== 0) {
		return false;
	}
	
	return $full_path;
}
protected function find_handler_path ( $ filename ) { $ filename = strtolower ( $ filename ) ; if ( preg_match ( '{[^a-z0-9/_-]}' , $ filename ) ) { return false ; } $ base_path = \ alsvanzelf \ fem \ ROOT_DIR_APP . $ this -> handler_base_path . '/' ; $ full_path = $ base_path . $ filename . '.php' ; if ( file_exists ( $ full_path ) == false ) { return false ; } // sanity check to prevent escaping outside the base dir if ( strpos ( $ full_path , $ base_path ) !== 0 ) { return false ; } return $ full_path ; }
finds the handler's file

@param  string $filename a filename, relative to the handlers directory, and w/o '.php'
@return string|boolean   the full path, including \alsvanzelf\fem\ROOT_DIR_APP
or false when not found
finds the handler s file