X-Git-Url: https://git.llucax.com/z.facultad/75.43/tp1.git/blobdiff_plain/0f8291748d189597a52452a196aeacbc247ee450..c5fcf680548c2cb2b2e0bbdae67d1794cbe78eed:/src/lib/Item.php?ds=sidebyside diff --git a/src/lib/Item.php b/src/lib/Item.php index d4b59c7..8dea6e9 100644 --- a/src/lib/Item.php +++ b/src/lib/Item.php @@ -1,5 +1,12 @@ campos; + } + + // Devuelve los campos a listar del objeto actual como un array. + function asArray() + { + $arr = array(); + foreach ($this->campos as $campo) + { + $campo = strtolower($campo); + $arr[] = $this->$campo; + } + return $arr; } }