thesis_type = 'bachelor'; } else if (strpos ($txt, 'doctor')!==false) { $this->thesis_type = 'dissertation'; } else if (strpos ($txt, 'master')!==false) { $this->thesis_type = 'thesis'; } return; } // each type has its own master record // THIS ONLY ADDS article (master of publication) protected function _addMaster() { if (!$this->_isPublisher()) { $this->_addPublisher(); } try { $stmt = $this->PDO->prepare("INSERT INTO p_thesis (id_inst, type) VALUES (:id_publisher, :type)"); $stmt->execute(array('id_publisher' => $this->publisher_id, 'type'=>$this->thesis_type)); $master_id = $this->PDO->lastInsertId(); return $master_id; } catch (exception $ex) { common::except ('Err: ' .$ex .' in ' .__DIR__ .'/' .__FILE__ .':' .__LINE__); } return false; } }