Example #1
0
 /**
  * @param EveApiEventInterface $event
  * @param string               $eventName
  * @param MediatorInterface    $yem
  *
  * @return EveApiEventInterface
  * @throws \DomainException
  * @throws \InvalidArgumentException
  * @throws \LogicException
  * @throws \Yapeal\Exception\YapealDatabaseException
  */
 public function startEveApi(EveApiEventInterface $event, string $eventName, MediatorInterface $yem)
 {
     if (!$this->hasYem()) {
         $this->setYem($yem);
     }
     $data = $event->getData();
     $apiName = $data->getEveApiName();
     $data->setEveApiName('StarbaseList');
     // Insure Starbase list has already been updated first so we have current list to get details with.
     $this->emitEvents($data, 'start');
     $data->setEveApiName($apiName)->setEveApiXml('');
     return parent::startEveApi($event->setData($data), $eventName, $yem);
 }
Example #2
0
 /**
  * @param EveApiEventInterface $event
  * @param string               $eventName
  * @param MediatorInterface    $yem
  *
  * @return EveApiEventInterface
  * @throws \DomainException
  * @throws \InvalidArgumentException
  * @throws \LogicException
  * @throws \Yapeal\Exception\YapealDatabaseException
  */
 public function startEveApi(EveApiEventInterface $event, string $eventName, MediatorInterface $yem)
 {
     if (!$this->hasYem()) {
         $this->setYem($yem);
     }
     $data = $event->getData();
     $apiName = $data->getEveApiName();
     $data->setEveApiName($apiName . 'History');
     // Insure history has already been updated first so current data overwrites old data.
     $this->emitEvents($data, 'start');
     $data->setEveApiName($apiName)->setEveApiXml('');
     return parent::startEveApi($event->setData($data), $eventName, $yem);
 }