Ejemplo n.º 1
0
 protected function makeEntity($data = null)
 {
     $promise = new PendingPromise();
     try {
         $data = $promise->getData();
         $rowsCount = $this->store->insert($data);
     } catch (\Exception $e) {
         throw new PromiseException('Can\'t insert promiseData. Promise: ' . $promise->getId(), 0, $e);
     }
     if (!$rowsCount) {
         throw new PromiseException('Can\'t insert promiseData. Promise: ' . $promise->getId());
     }
     return $promise;
 }