public function getAvailableMethods($customMethods = null)
    {
        foreach ([$this->methods, $customMethods ?: $this->getCustomMethods()] as $methods) {
            foreach ($methods as $method => $action) {
                $method = is_int($method) ? $action : $method;
                if (substr($method, 0, 2) !== '__') {
                    yield $method;
                }
            }
        }
    }