public function load(Model $m, $id, $table = null)
    {
        if (isset($m->table) && !isset($this->data[$m->table])) {
            throw new Exception([
                'Table was not found in the array data source',
                'table' => $m->table,
            ]);
        }

        if (!isset($this->data[$table ?: $m->table][$id])) {
            throw new Exception([
                'Record with specified ID was not found',
                'id' => $id,
            ], 404);
        }

        return $this->tryLoad($m, $id, $table);
    }
public function load(Model $m, $id, $table = null)
    {
        if (isset($m->table) && !isset($this->data[$m->table])) {
            throw new Exception([
                'Table was not found in the array data source',
                'table' => $m->table,
            ]);
        }

        if (!isset($this->data[$table ?: $m->table][$id])) {
            throw new Exception([
                'Record with specified ID was not found',
                'id' => $id,
            ], 404);
        }

        return $this->tryLoad($m, $id, $table);
    }
public function load ( Model $ m , $ id , $ table = null ) { if ( isset ( $ m -> table ) && ! isset ( $ this -> data [ $ m -> table ] ) ) { throw new Exception ( [ 'Table was not found in the array data source' , 'table' => $ m -> table , ] ) ; } if ( ! isset ( $ this -> data [ $ table ? : $ m -> table ] [ $ id ] ) ) { throw new Exception ( [ 'Record with specified ID was not found' , 'id' => $ id , ] , 404 ) ; } return $ this -> tryLoad ( $ m , $ id , $ table ) ; }
Loads model and returns data record.

@param Model  $m
@param mixed  $id
@param string $table

@return array|false
Loads model and returns data record .