Hello I would like to ask how can I get the $manufacturer and $id from the function postData() which included with other class. So I can pass it to my model. Thank you.
class postDataManager{
public function postData(){
$manufacturer = $_POST['manufacturer'];
$id = $_POST['id'];
}
}
class manufactureController extends postDataManager{
private $model;
public function __construct(){
$this->model = new manufacturerModel();
$postDataManager= new postDataManager();
}
public function addManufacturer(){ //get the add function
//here i need access for the variable $manufaturer from class postData function
$this->model->addProcess($manufacturer);
}
public function updateManufacturer(){ //get the update function
//here i need access for the variable $manufaturer and $id from class postData function
$this->model->updateProcess($id, $manufacturer);
}
}