public static function getControllerTableInstance(string $controllerName): \Cake\ORM\Table
    {
        $tableName = App::shortName($controllerName, 'Controller', 'Controller');

        // remove vendor prefix
        if (false !== strpos($tableName, '/')) {
            $tableName = substr($tableName, strpos($tableName, '/') + 1);
        }

        return TableRegistry::get($tableName);
    }
public static function getControllerTableInstance(string $controllerName): \Cake\ORM\Table
    {
        $tableName = App::shortName($controllerName, 'Controller', 'Controller');

        // remove vendor prefix
        if (false !== strpos($tableName, '/')) {
            $tableName = substr($tableName, strpos($tableName, '/') + 1);
        }

        return TableRegistry::get($tableName);
    }
public static function getControllerTableInstance ( string $ controllerName ) : \ Cake \ ORM \ Table { $ tableName = App :: shortName ( $ controllerName , 'Controller' , 'Controller' ) ; // remove vendor prefix if ( false !== strpos ( $ tableName , '/' ) ) { $ tableName = substr ( $ tableName , strpos ( $ tableName , '/' ) + 1 ) ; } return TableRegistry :: get ( $ tableName ) ; }
Method that returns Table instance of specified controller.

@param  string          $controllerName Controller name
@return \Cake\ORM\Table
Method that returns Table instance of specified controller .