function libCorpEstadoById($sqEstado) { try { $result = EstadoBusiness::factory()->find($sqEstado); $result = !$result->isEmpty() ? $result->toXml() : NULL; return sprintf('<%1$s>%2$s</%1$s>', 'result', $result); } catch (\Exception $excp) { throw new IOException($excp->getMessage()); } }
/** * @return EstadoValueObject * */ public function getSqEstado() { if (NULL != $this->_sqEstado && !$this->_sqEstado instanceof parent) { $this->_sqEstado = EstadoBusiness::factory(NULL, 'libcorp')->find($this->_sqEstado); } return $this->_sqEstado; }