Skip to content

Instantly share code, notes, and snippets.

@snahor
Created May 3, 2012 18:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save snahor/2588083 to your computer and use it in GitHub Desktop.
Save snahor/2588083 to your computer and use it in GitHub Desktop.
<?php
class Persona
{
public $nombres = '';
public $ape_paterno = '';
public $ape_materno = '';
public $edad = null;
public function ponerNombresApellidos($nombres, $ape_pat, $ape_mat)
{
$this->nombres = $nombres;
$this->ape_paterno = $ape_pat;
$this->ape_materno = $ape_mat;
}
}
class Paciente extends Persona
{
public $enfermedades = array();
public function agregarEnfermedad($enfermedad)
{
$this->enfermedades[] = $enfermedad;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment