<commit_before><?php
namespace Gt\WebEngine\Dispatch;

use Gt\WebEngine\Route\Router;
use Psr\Http\Message\RequestInterface;

class Dispatcher {
	/** @var Router */
	protected $router;

	public function __construct(Router $router) {
		$this->router = $router;
	}
	public function handle(RequestInterface $request) {
		$path = $request->getUri()->getPath();
		$baseViewLogicPath = $this->router->getBaseViewLogicPath();
		$viewLogicSubPath = $this->router->getViewLogicSubPath($path);
	}
}<commit_msg>Handle request _and_ response<commit_after><?php
namespace Gt\WebEngine\Dispatch;

use Gt\WebEngine\Route\Router;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;

class Dispatcher {
	/** @var Router */
	protected $router;

	public function __construct(Router $router) {
		$this->router = $router;
	}
	public function handle(RequestInterface $request, ResponseInterface $response) {
		$path = $request->getUri()->getPath();
		$viewFile = $this->router->getViewFile($path);

		var_dump($viewFile);die();
	}
}
{'fraction_non_alphanumeric': 0.14754098360655737, 'fraction_numerical': 0.0, 'mean_word_length': 5.653846153846154, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '213531', 'n_tokens_mistral': 348, 'n_tokens_neox': 335, 'n_words': 64}