Esempio n. 1
0
 /**
  * @param array|null $dados
  * @return WeLearn_DTO_IDTO
  */
 public function criarNovo(array $dados = null)
 {
     $segmento = new WeLearn_Cursos_Segmento();
     $segmento->preencherPropriedades($dados);
     return $segmento;
 }
Esempio n. 2
0
 /**
  * (PHP 5 &gt;= 5.1.0)<br/>
  * Constructs the object
  * @link http://php.net/manual/en/serializable.unserialize.php
  * @param string $serialized <p>
  * The string representation of the object.
  * </p>
  * @return mixed the original value unserialized.
  */
 public function unserialize($serialized)
 {
     $arrayUsuario = unserialize($serialized);
     $area = new WeLearn_Cursos_Area();
     $area->preencherPropriedades($arrayUsuario['segmentoInteresse']['area']);
     $arrayUsuario['segmentoInteresse']['area'] = $area;
     $segmento = new WeLearn_Cursos_Segmento();
     $segmento->preencherPropriedades($arrayUsuario['segmentoInteresse']);
     $arrayUsuario['segmentoInteresse'] = $segmento;
     $configuracao = new WeLearn_Usuarios_ConfiguracaoUsuario($arrayUsuario['configuracao']);
     $arrayUsuario['configuracao'] = $configuracao;
     if (isset($arrayUsuario['imagem']) && is_array($arrayUsuario['imagem'])) {
         $imagem = new WeLearn_Usuarios_ImagemUsuario($arrayUsuario['imagem']);
         $arrayUsuario['imagem'] = $imagem;
     } else {
         unset($arrayUsuario['imagem']);
     }
     $this->__construct($arrayUsuario);
     $this->_nivelAcesso = $arrayUsuario['nivelAcesso'];
 }