Exemplo n.º 1
0
 /**
  * Set The Mayor
  * 
  * @param \Ddnet\FoursquareBundle\Entity\User $user
  * @param boolean $count
  * 
  * @return \Ddnet\FoursquareBundle\Entity\Venue
  */
 public function setMayor($user = null, $count = 0)
 {
     if (!is_null($user) && $user instanceof User) {
         $this->mayor['user'] = $user;
     } elseif (!is_null($user) && is_array($user)) {
         $u = new User();
         $u->fromArray($user);
     }
     $this->mayor['count'] = $count;
     return $this;
 }
Exemplo n.º 2
0
 public function setUser($user)
 {
     if ($user instanceof fsUser) {
         $this->user = $user;
     } elseif (is_array($user)) {
         $this->user = new fsUser();
         $this->user->fromArray($user);
     } else {
         throw new FoursquareException('User should be an array or of type Ddnet\\FoursquareBundle\\Entity\\User');
     }
     return $this;
 }