I have implemented a controller to give access of data of candidates.
class List_Controller extends CI_Controller {
public function __construct()
{
parent::__construct();
$data[]=array();
/*
Here I want to get value of $area parameter, to save into logs
*/
$userId=$this->session->userdata('userId');
// save logs
$this->UrlAccessHistory->save($this->router->class,$this->router->method,$userId,"Web Application");
}
public function fetchList($area=null){
// fetch list of records from specified area
}
}
$this->router->className
gives name of controller Class and $this->router->method
gives name of of function called.
Please help to get the list of parameters at location (see comments in code) in the constructor, so that I can store it in the logs.
You could use the URI Class:
$this->uri->segment(n);
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments