protected function setDefaultController()
	{
		if (empty($this->controller))
		{
			throw RouterException::forMissingDefaultRoute();
		}

		// Is the method being specified?
		if (sscanf($this->controller, '%[^/]/%s', $class, $this->method) !== 2)
		{
			$this->method = 'index';
		}

		if (! is_file(APPPATH . 'Controllers/' . $this->directory . ucfirst($class) . '.php'))
		{
			return;
		}

		$this->controller = ucfirst($class);

		log_message('info', 'Used the default controller.');
	}
protected function setDefaultController()
	{
		if (empty($this->controller))
		{
			throw RouterException::forMissingDefaultRoute();
		}

		// Is the method being specified?
		if (sscanf($this->controller, '%[^/]/%s', $class, $this->method) !== 2)
		{
			$this->method = 'index';
		}

		if (! is_file(APPPATH . 'Controllers/' . $this->directory . ucfirst($class) . '.php'))
		{
			return;
		}

		$this->controller = ucfirst($class);

		log_message('info', 'Used the default controller.');
	}
protected function setDefaultController ( ) { if ( empty ( $ this -> controller ) ) { throw RouterException :: forMissingDefaultRoute ( ) ; } // Is the method being specified? if ( sscanf ( $ this -> controller , '%[^/]/%s' , $ class , $ this -> method ) !== 2 ) { $ this -> method = 'index' ; } if ( ! is_file ( APPPATH . 'Controllers/' . $ this -> directory . ucfirst ( $ class ) . '.php' ) ) { return ; } $ this -> controller = ucfirst ( $ class ) ; log_message ( 'info' , 'Used the default controller.' ) ; }
Sets the default controller based on the info set in the RouteCollection.
Sets the default controller based on the info set in the RouteCollection .