Example #1
0
 public function addList($list)
 {
     if ($list instanceof \Self) {
         $this->lists[] = $list;
         return $this;
     } elseif (is_array($list)) {
         $c = new \Self();
         $c->fromArray($list);
         return $this;
     } else {
         throw new FoursquareException('List should be an array or a single entity of type Ddnet\\FoursquareBundle\\Entity\\List');
     }
 }
Example #2
0
 public function addCategory($category)
 {
     if ($category instanceof \Self) {
         $this->categories[] = $category;
         return $this;
     } elseif (is_array($category)) {
         $c = new \Self();
         $c->fromArray($category);
         return $this;
     } else {
         throw new FoursquareException('Category should be an array or a single entity of type Ddnet\\FoursquareBundle\\Entity\\Category');
     }
 }