public function createUser() { //$classVars = get_class_vars(__CLASS__); $classVars = get_object_vars($this); unset($classVars['table']); $objBDD = new classBDD(); $objBDD->insertDB($this->table, $classVars); //var_dump($classVars); }