Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
mnet_peer Class Reference

Public Member Functions

 bootstrap ($wwwroot, $pubkey, $application)
 
 check_common_name ($key)
 
 check_credentials ($key)
 
 commit ()
 
 count_live_sessions ()
 
 delete ()
 
 delete_all_sessions ()
 
 delete_expired_sessions ()
 
 get_public_key ()
 Get public key.
 
 populate ($hostinfo)
 Several methods can be used to get an 'mnet_host' record.
 
 set_applicationid ($applicationid)
 
 set_id ($id)
 
 set_name ($newname)
 
 set_wwwroot ($wwwroot)
 Load information from db about an mnet peer into this object's properties.
 
 touch ()
 

Public Attributes

stdClass $application
 data from mnet_application table in DB.
 
 $applicationid = 1
 
 $bootstrapped = false
 
string $currentkey
 Current SSL public key.
 
int $deleted
 deleted status.
 
 $error = array()
 
 $force_theme = 0
 
 $id = 0
 
 $ip_address = ''
 
 $keypair = array()
 
 $last_connect_time = 0
 
 $last_log_id = 0
 
 $name = ''
 
 $public_key = ''
 
 $public_key_expires = 0
 
int $sslverification = self::SSL_HOST_AND_PEER
 $sslverification The level of SSL verification to apply.
 
 $theme = ''
 
 $wwwroot = ''
 
const SSL_HOST = 1
 SSL verification for host.
 
const SSL_HOST_AND_PEER = 2
 SSL verification for host and peer.
 
const SSL_NONE = 0
 No SSL verification.
 

Member Function Documentation

◆ get_public_key()

mnet_peer::get_public_key ( )

Get public key.

Deprecated
since Moodle 4.3
Todo
MDL-78304 Final deprecation.

◆ populate()

mnet_peer::populate ( $hostinfo)

Several methods can be used to get an 'mnet_host' record.

They all then send it to this private method to populate this object's attributes.

Parameters
object$hostinfoA database record from the mnet_host table
Return values
void

◆ set_wwwroot()

mnet_peer::set_wwwroot ( $wwwroot)

Load information from db about an mnet peer into this object's properties.

Parameters
string$wwwroot- address of peer whose details we want to load
Return values
bool- indication of success or failure

Member Data Documentation

◆ $currentkey

string mnet_peer::$currentkey

Current SSL public key.

MNet need to compare the remote machine's SSL Cert and the public key to warn users of any mismatch. The property is the remote machine's SSL Cert.

See also
admin/mnet/peers.php

The documentation for this class was generated from the following file: