public function search() { //$this->output->enable_profiler(true); $this->load->model('Card'); $data = array(); $data['method'] = $this->input->method(); if ($data['method'] === 'post') { $searched_str = $this->input->post('searched_str'); $is_case_sensitive = $this->input->post('case_sensitive') !== null ? true : false; $language = $this->input->post('language') !== null ? $this->input->post('language') : 'both'; $state = $this->input->post('state') !== null ? $this->input->post('state') : 'both'; $searched_cards = Card::retrieve_searched_cards($searched_str, $is_case_sensitive, $language, $state); $data['searched_cards'] = $searched_cards; } $this->layout->add_basic_assets()->menu()->action_view($data); }