*/ abstract class AbstractRoute implements Route { /** * Owner of the route * * @var common_ext_Extension */ private $extension; /** * Id of the route * * @var string */ private $id; /** * Data the route requires to resolve * * @var mixed */ private $config; /** * * @param common_ext_Extension $extension * @param string $routeId * @param mixed $routeConfig */ public function __construct(common_ext_Extension $extension, $routeId, $routeConfig) { $this->extension = $extension; $this->id = $routeId; $this->config = $routeConfig; } /** * * @return common_ext_Extension */ protected function getExtension() { return $this->extension; } /** * * @return mixed */ protected function getConfig() { return $this->config; } /** * * @return string */ protected function getId() { return $this->id; } /** * Returns the name of the controller and action to call * or null if it doesn't apply * @param ServerRequestInterface $request * @return string */ abstract public function resolve(ServerRequestInterface $request); }