protected function defineLocalMethods($arr = [])
    {
        foreach (get_class_methods($this) as $m) {
            if (substr($m, -6) === 'Method') {
                $k = substr($m, 0, -6);
                if ($k === 'methods') {
                    continue;
                }
                $arr[$k] = [$this, $m];
            }
        }
        foreach ($arr as $k => $v) {
            $this->localMethods[$k] = $v;
        }
        $this->persistentMode = true;
        $this->callRemote('methods', $arr);
        $this->persistentMode = false;
    }