<?php

namespace Tools;

/**
 * Controller abstract class
**/
abstract class AController
{
	/**
	 * @var array $params
	 * Contains route parameter
	 * ex: /product/:id will contains {
	 *    0 => product
	 *    1 => [ID]
	 *    ':id' => [ID]
	**/
	protected $params;

	/**
	 * @param \Tools\Context $context
	 * @param array $params
	 * @throws \Exception\Error404 if parameters does not correspond
	 * On 404 error, router will try to find another route
	 * Initialize structure
	**/
	public function __construct($context, $params)
	{
		$this->params = $params;
	}

	/**
	 * Fullfill Controller's request
	**/
	public abstract function start();
}

