public function __construct($url) { $tipo_controller = new Tipo_controller(); $termino_controller = new Termino_controller(); $path = parse_url($url, PHP_URL_PATH); $this->url = $path; $segments = explode('/', rtrim($path, '/')); if (!isset($segments[3])) { $segments[3] = 'index'; } $this->segmento = array_splice($segments, 2); $this->palabras_reservadas['tipos'] = $tipo_controller->obtener_slugs(); $this->palabras_reservadas['terminos'] = $termino_controller->obtener_slugs(); $this->objeto = null; }