public function get_remote_plugin_info($component, $version, $exactmatch) {

        if ($exactmatch and $version == ANY_VERSION) {
            throw new coding_exception('Invalid request for exactly any version, it does not make sense.');
        }

        $client = $this->get_update_api_client();

        if ($exactmatch) {
            // Use client's get_plugin_info() method.
            if (!isset($this->remotepluginsinfoexact[$component][$version])) {
                $this->remotepluginsinfoexact[$component][$version] = $client->get_plugin_info($component, $version);
            }
            return $this->remotepluginsinfoexact[$component][$version];

        } else {
            // Use client's find_plugin() method.
            if (!isset($this->remotepluginsinfoatleast[$component][$version])) {
                $this->remotepluginsinfoatleast[$component][$version] = $client->find_plugin($component, $version);
            }
            return $this->remotepluginsinfoatleast[$component][$version];
        }
    }
public function get_remote_plugin_info($component, $version, $exactmatch) {

        if ($exactmatch and $version == ANY_VERSION) {
            throw new coding_exception('Invalid request for exactly any version, it does not make sense.');
        }

        $client = $this->get_update_api_client();

        if ($exactmatch) {
            // Use client's get_plugin_info() method.
            if (!isset($this->remotepluginsinfoexact[$component][$version])) {
                $this->remotepluginsinfoexact[$component][$version] = $client->get_plugin_info($component, $version);
            }
            return $this->remotepluginsinfoexact[$component][$version];

        } else {
            // Use client's find_plugin() method.
            if (!isset($this->remotepluginsinfoatleast[$component][$version])) {
                $this->remotepluginsinfoatleast[$component][$version] = $client->find_plugin($component, $version);
            }
            return $this->remotepluginsinfoatleast[$component][$version];
        }
    }
public function get_remote_plugin_info ( $ component , $ version , $ exactmatch ) { if ( $ exactmatch and $ version == ANY_VERSION ) { throw new coding_exception ( 'Invalid request for exactly any version, it does not make sense.' ) ; } $ client = $ this -> get_update_api_client ( ) ; if ( $ exactmatch ) { // Use client's get_plugin_info() method. if ( ! isset ( $ this -> remotepluginsinfoexact [ $ component ] [ $ version ] ) ) { $ this -> remotepluginsinfoexact [ $ component ] [ $ version ] = $ client -> get_plugin_info ( $ component , $ version ) ; } return $ this -> remotepluginsinfoexact [ $ component ] [ $ version ] ; } else { // Use client's find_plugin() method. if ( ! isset ( $ this -> remotepluginsinfoatleast [ $ component ] [ $ version ] ) ) { $ this -> remotepluginsinfoatleast [ $ component ] [ $ version ] = $ client -> find_plugin ( $ component , $ version ) ; } return $ this -> remotepluginsinfoatleast [ $ component ] [ $ version ] ; } }
Returns information about a plugin in the plugins directory.

This is typically used when checking for available dependencies (in
which case the $version represents minimal version we need), or
when installing an available update or a new plugin from the plugins
directory (in which case the $version is exact version we are
interested in). The interpretation of the $version is controlled
by the $exactmatch argument.

If a plugin with the given component name is found, data about the
plugin are returned as an object. The ->version property of the object
contains the information about the particular plugin version that
matches best the given critera. The ->version property is false if no
suitable version of the plugin was found (yet the plugin itself is
known).

See {@link \core\update\api::validate_pluginfo_format()} for the
returned data structure.

@param string $component plugin frankenstyle name
@param string|int $version ANY_VERSION or the version number
@param bool $exactmatch false if "given version or higher" is requested
@return \core\update\remote_info|bool
Returns information about a plugin in the plugins directory .