public function __construct(Mappable $entity, Mapper $mapper, QueryAdapter $query) { $this->entity = $entity; $this->mapper = $mapper; $this->entityState = new StateChecker($entity, $mapper); $this->entityMap = $mapper->getEntityMap(); $this->query = $query->from($this->entityMap->getTable()); }
/** * Get the table for the current query object * * @return string */ public function getTable() { return $this->entityMap->getTable(); }