public function listar($ordem = "ASC", $campo = self::ID) { $info = parent::listar($ordem, $campo); if (!empty($info)) { $temp = new GaleriaCategoria($info[self::ID]); parent::resgatarObjetos($info); $temp->titulo = $info[self::TITULO]; $temp->protegido = $info[self::PROTEGIDO] == self::VALOR_PROTEGIDO_TRUE ? true : false; $temp->setAltura($info[self::ALTURA]); $temp->setLargura($info[self::LARGURA]); $temp->setAlturaMedia($info[self::ALTURAMEDIA]); $temp->setLarguraMedia($info[self::LARGURAMEDIA]); $temp->setAlturaPequena($info[self::ALTURAPEQUENA]); $temp->setLarguraPequena($info[self::LARGURAPEQUENA]); $temp->setURL($info[parent::URL]); if (is_object($info[parent::TEXTO])) { $temp->setTexto($info[parent::TEXTO]); } return $temp; } }