/** * Obtener un Responsable único. * * @param ResponsableDTO &$responsableDTO */ public function getResponsable(ResponsableDTO &$responsableDTO) { $responsable = ResponsableDTO::toEntity($responsableDTO); # Validamos los campos if (!EntityValidator::validateId($responsable->getId())) { throw new Exception(SALAS_COMP_ALERT_E_VALIDATION_FAIL, $this->ID + 6); } # Obtenemos la entidad if (!$this->responsableBean->getResponsable($responsable)) { throw new Exception(SALAS_COMP_ALERT_E_ENTITY_NOT_FOUND2_FAIL, $this->ID + 7); } $responsableDTO->loadFromEntity($responsable); }