Ejemplo n.º 1
0
 protected function getEvent()
 {
     $email = new Email('phpminds.org@gmail.com');
     $twitter = new Twitter('@PHPMiNDS');
     $startDate = '2017-03-10';
     $startTime = '20:00';
     $eventDuration = 'PT2H';
     $speaker = new Speaker('AnAwesome', 'Speaker', $email, $twitter);
     $speaker->setId(300);
     $talk = new Talk('A title', 'A description. But I think we need a much longer description in order for joind.in to accept this talk...', $speaker, $eventDuration);
     $talk->setId(200);
     $venue = new Venue('JH', 'by the sidewalk', 'Europe');
     $venue->setId(100);
     $supporter = new Supporter('a big fan', 'youareawso.me', $twitter, $email, 'http://nolo.go');
     $supporter->setId(350);
     return new Event($talk, $startDate, $startTime, $venue, $supporter);
 }
Ejemplo n.º 2
0
 /**
  * @return array
  */
 public function getVenues()
 {
     $venuesUrl = $this->meetupEvent->getVenuesUrl();
     $result = json_decode($this->httpClient->get($venuesUrl)->getBody()->getContents(), true)['results'];
     $venues = [];
     foreach ($result as $venue) {
         $venueInfo = Venue::create(['id' => $venue['id'], 'name' => $venue['name'], 'address' => $venue['address_1']]);
         $venues[$venueInfo->getId()] = $venueInfo;
     }
     return $venues;
 }