atk4\data\Persistence_SQL::load PHP Method

load() public method

Loads a record from model and returns a associative array.
public load ( Model $m, mixed $id ) : array
$m Model
$id mixed
return array
    public function load(Model $m, $id)
    {
        $data = $this->tryLoad($m, $id);
        if (!$data) {
            throw new Exception(['Record was not found', 'model' => $m, 'id' => $id, 'conditions' => $m->conditions], 404);
        }
        return $data;
    }