Ejemplo n.º 1
0
 public static function generateFromResponse($response, $adapter = null)
 {
     $r = parent::generateFromResponse($response, $adapter);
     $r->setIdentifier(static::parser('id', $response));
     $r->setName(static::parser('name', $response));
     $r->setLink(static::parser('link', $response));
     return $r;
 }
Ejemplo n.º 2
0
 public static function generateFromResponse($response, $adapter)
 {
     $event = parent::generateFromResponse($response, $adapter);
     $event->setIdentifier(static::parser('id', $response));
     $event->setName(static::parser('name', $response));
     $event->setDescription(static::parser('description', $response));
     $event->setStartTime(static::parser('start_time', $response));
     $event->setEndTime(static::parser('end_time', $response));
     $event->setLocation(static::parser('location', $response));
     $event->setTicketURI(static::parser('ticket_uri', $response));
     if (property_exists($response, 'venue')) {
         $venue = $response->venue;
         $event->setStreet(static::parser('street', $venue));
         $event->setZip(static::parser('zip', $venue));
         $event->setCountry(static::parser('country', $venue));
         $event->setLatitude(static::parser('latitude', $venue));
         $event->setLongitude(static::parser('longitude', $venue));
     }
     return $event;
 }