示例#1
0
 public function toArray($deep = true)
 {
     $array = get_object_vars($this);
     $array['estado'] = $this->estado->toArray();
     $array['grupo'] = $this->grupo->toArray($deep);
     $array['participantes'] = $deep ? array_map(function ($p) {
         return $p->toArray(false);
     }, $this->participantes->toArray()) : $this->participantes->count();
     return $array;
 }
示例#2
0
 /**
  * Set grupo
  *
  * @param \JuegoPostas\AppBundle\Entity\Grupo $grupo
  * @return Camino
  */
 public function setGrupo(\JuegoPostas\AppBundle\Entity\Grupo $grupo = null)
 {
     $this->grupo = $grupo;
     $grupo->setCamino($this);
     return $this;
 }