Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Contacto {
- private $idRegistro;
- private $nombre;
- private $telefono;
- public function setId($cod) {
- $this->idRegistro = $cod;
- }
- public function getId() {
- return $this->idRegistro;
- }
- public function setNombre($str) {
- $this->nombre = $str;
- }
- public function getNombre() {
- return $this->nombre;
- }
- public function setTelefono($num) {
- $this->telefono = $num;
- }
- public function getTelefono() {
- return $this->telefono;
- }
- public function __toString() {
- return $this->getId() . "<br/>" .
- $this->getNombre() . "<br/>" .
- $this->getTelefono() . "<br/>";
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement