Let say at my controller named Book, I have many methods, such as get_book(); read_book(); remove_book();
get_book();
read_book();
remove_book();
You can use the method in constructor of controller, like:
if ( ! $this->session->userdata('logged_in')) { redirect('login'); }