CakeDC\Users\Auth\Rules\AbstractRule::_getTableFromRequest PHP Method

_getTableFromRequest() protected method

Inspect the request and try to retrieve a table based on the current controller
protected _getTableFromRequest ( Cake\Network\Request $request ) : Table
$request Cake\Network\Request request
return Cake\ORM\Table
    protected function _getTableFromRequest(Request $request)
    {
        $plugin = Hash::get($request->params, 'plugin');
        $controller = Hash::get($request->params, 'controller');
        $modelClass = ($plugin ? $plugin . '.' : '') . $controller;
        $this->modelFactory('Table', [$this->tableLocator(), 'get']);
        if (empty($modelClass)) {
            throw new OutOfBoundsException(__d('CakeDC/Users', 'Table alias is empty, please define a table alias, we could not extract a default table from the request'));
        }
        return $this->loadModel($modelClass);
    }