Example #1
0
 /**
  * Get value of primary key for given entity
  * @param \Spot\Entity\EntityInterface $entity Instance of an entity to find the primary key of
  * @return mixed
  */
 public function getPrimaryKeyValues(EntityInterface $entity)
 {
     $values = [];
     foreach ($this->getPrimaryKeys($entity->toString()) as $pk) {
         $values[$pk] = $entity->get($pk);
     }
     return $values;
 }