$segundonom = utf8_decode($_POST["segundoNom"]); $primerape = utf8_decode($_POST["primerApe"]); $segundoape = utf8_decode($_POST["segundoApe"]); $segundonom = str_replace("", "\\b", $segundonom); $segundoape = str_replace("", "\\b", $segundoape); $nombre = $primernom . " " . $segundonom . " " . $primerape . " " . $segundoape; $password = utf8_decode($_POST["password"]); $direccion = utf8_decode($_POST["direccion"]); $telefono = utf8_decode($_POST["telefono"]); $telefono2 = utf8_decode($_POST["telefono2"]); $email = utf8_decode($_POST["email"]); $celular = utf8_decode($_POST["celular"]); $certificacion = $_POST["certificacion"]; $estudios = $_POST["estudios"]; $artesano = new Artesano(); $artesano->setNombre($nombre); $artesano->setTipoDoc($tipodoc); $artesano->setNroDoc($nroDoc); $artesano->setPassword($password); $artesano->setDireccion($direccion); $artesano->setTelefono($telefono); $artesano->setTelefono2($telefono2); $artesano->setUsername($username); $artesano->setCelular($celular); $artesano->setCertificacion($certificacion); $artesano->setEmail($email); $artesano->setNivelestudio($estudios); $artesano->setEstado(0); if ($artesanoDao->create($conn, $artesano)) { $list = $artesanoDao->searchMatching($conn, $artesano); $artesano = $list[0];
/** * Clone will return identical deep copy of this valueObject. * Note, that this method is different than the clone() which * is defined in java.lang.Object. Here, the retuned cloned object * will also have all its attributes cloned. */ function cloneObject() { $cloned = new Artesano(); $cloned->setIdArtesano($this->idArtesano); $cloned->setTipoDoc($this->TipoDoc); $cloned->setNroDoc($this->NroDoc); $cloned->setPassword($this->password); $cloned->setDireccion($this->direccion); $cloned->setTelefono($this->telefono); $cloned->setTelefono2($this->telefono2); $cloned->setUsername($this->username); $cloned->setEstado($this->estado); $cloned->setNombre($this->nombre); $cloned->setCelular($this->celular); $cloned->setEmail($this->email); $cloned->setCertificacion($this->certificacion); $cloned->setNivelestudio($this->nivelestudio); $cloned->setAprendices($this->aprendices); $cloned->setCursos($this->cursos); $cloned->setFormatofoto($this->formatofoto); return $cloned; }