/** * Set where to fetch which columns * * This notifies the repository about each desired query column. * * @param mixed $target The target from which to fetch the columns * @param array $columns If null or an empty array, all columns will be fetched * * @return $this */ public function from($target, array $columns = null) { $this->query = $this->repository->getDataSource()->select(); $this->query->from($this->repository->requireTable($target, $this)); $this->query->columns($this->prepareQueryColumns($target, $columns)); $this->target = $target; return $this; }