Horde_Registry::listMethods PHP Method

listMethods() public method

Returns all of the available registry methods, or alternately only those for a specified API.
public listMethods ( string $api = null ) : array
$api string Defines the API for which the methods shall be returned. If null, returns all methods.
return array The method list.
    public function listMethods($api = null)
    {
        $methods = array();
        foreach (array_keys($this->applications) as $app) {
            if (isset($this->applications[$app]['provides'])) {
                $provides = $this->applications[$app]['provides'];
                if (!is_array($provides)) {
                    $provides = array($provides);
                }
                foreach ($provides as $method) {
                    if (strpos($method, '/') !== false) {
                        if (is_null($api) || substr($method, 0, strlen($api)) == $api) {
                            $methods[$method] = true;
                        }
                    } elseif (($api_ob = $this->_loadApi($app)) && (is_null($api) || $method == $api)) {
                        foreach ($api_ob->methods() as $service) {
                            $methods[$method . '/' . $service] = true;
                        }
                    }
                }
            }
        }
        return array_keys($methods);
    }