src/Entity.php
public function loadAll(array $where = [], bool $assoc = false, array $fields = null): Collection
    {
        $allData = $this->medoo->select($this->getTable(), $fields ? $fields : '*', $where);
        $this->sentry->breadcrumbs->record([
            'message' => 'Entity '.$this->__getEntityName().'::loadAll('.\print_r($where, true).', '.$assoc.', '.\print_r($fields, true).')',
            'data' => ['query' => $this->medoo->last()],
            'category' => 'Database',
            'level' => 'info',
        ]);
        $items = [];
        foreach ($allData as $data) {
            $items[] = ($assoc) ? $data : $this->container['entity']($this->__getEntityName())->setData($data);
        }

        return new Collection($items);
    }
public function loadAll(array $where = [], bool $assoc = false, array $fields = null): Collection
    {
        $allData = $this->medoo->select($this->getTable(), $fields ? $fields : '*', $where);
        $this->sentry->breadcrumbs->record([
            'message' => 'Entity '.$this->__getEntityName().'::loadAll('.\print_r($where, true).', '.$assoc.', '.\print_r($fields, true).')',
            'data' => ['query' => $this->medoo->last()],
            'category' => 'Database',
            'level' => 'info',
        ]);
        $items = [];
        foreach ($allData as $data) {
            $items[] = ($assoc) ? $data : $this->container['entity']($this->__getEntityName())->setData($data);
        }

        return new Collection($items);
    }
Get all entities from db.

@param array $where  Where clause
@param bool  $assoc  Return collection of entity objects OR of assoc arrays
@param array $fields Fields to load, default is all

@return Collection