Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
enrol_lti\local\ltiadvantage\entity\application_registration Class Reference

Public Member Functions

 add_tool_deployment (string $name, string $deploymentid)
 Add a tool deployment to this registration.
 
 complete_registration ()
 Attempt to progress this registration to the 'complete' state, provided required state exists.
 
 get_accesstokenurl ()
 Get the access token URL.
 
 get_authenticationrequesturl ()
 Get the authentication request URL.
 
 get_clientid ()
 Get the client id.
 
 get_id ()
 Get the integer id of this object instance.
 
 get_jwksurl ()
 Get the JWKS URL.
 
 get_name ()
 Get the name of the application being registered.
 
 get_platformid ()
 Get the platform id.
 
 get_uniqueid ()
 Return the local unique client id of the registration.
 
 is_complete ()
 Check whether this registration is complete or not.
 
 set_accesstokenurl (\moodle_url $accesstokenurl)
 Sets the access token URL for this registration.
 
 set_authenticationrequesturl (\moodle_url $authenticationrequesturl)
 Sets the authentication request URL for this registration.
 
 set_clientid (string $clientid)
 Sets the client id for this registration.
 
 set_jwksurl (\moodle_url $jwksurl)
 Sets the JWKS URL for this registration.
 
 set_name (string $name)
 Sets the name of this registration.
 
 set_platformid (\moodle_url $platformid)
 Sets the platformid/issuer for this registration.
 

Static Public Member Functions

static create (string $name, string $uniqueid, moodle_url $platformid, string $clientid, moodle_url $authenticationrequesturl, moodle_url $jwksurl, moodle_url $accesstokenurl, int $id=null)
 Factory method to create a new instance of an application registration.
 
static create_draft (string $name, string $uniqueid, int $id=null)
 Factory method to create a draft application registration.
 

Public Attributes

int const REGISTRATION_STATUS_COMPLETE = 1
 const representing a complete state
 
int const REGISTRATION_STATUS_INCOMPLETE = 0
 const representing the incomplete state
 

Member Function Documentation

◆ add_tool_deployment()

enrol_lti\local\ltiadvantage\entity\application_registration::add_tool_deployment ( string $name,
string $deploymentid )

Add a tool deployment to this registration.

Parameters
string$namehuman readable name for the deployment.
string$deploymentidthe unique id of the tool deployment in the platform.
Return values
deploymentthe new deployment.
Exceptions
coding_exceptionif trying to add a deployment to an instance without an id assigned.

◆ complete_registration()

enrol_lti\local\ltiadvantage\entity\application_registration::complete_registration ( )

Attempt to progress this registration to the 'complete' state, provided required state exists.

See also
REGISTRATION_STATUS_COMPLETE
Exceptions
coding_exceptionif the registration isn't in a state to be transitioned to complete.

◆ create()

static enrol_lti\local\ltiadvantage\entity\application_registration::create ( string $name,
string $uniqueid,
moodle_url $platformid,
string $clientid,
moodle_url $authenticationrequesturl,
moodle_url $jwksurl,
moodle_url $accesstokenurl,
int $id = null )
static

Factory method to create a new instance of an application registration.

Parameters
string$namethe descriptor for this application registration.
string$uniqueida unique identifier for the registration used in place of client_id in the login URI.
moodle_url$platformidthe URL of application
string$clientidunique id for the client on the application
moodle_url$authenticationrequesturlURL to send OIDC Auth requests to.
moodle_url$jwksurlURL to use to get public keys from the application.
moodle_url$accesstokenurlURL to use to get an access token from the application, used in service calls.
int | null$idthe id of the object instance, if being created from an existing store item.
Return values
application_registrationthe application_registration instance.
Exceptions
coding_exceptionif an invalid clientid is provided.

◆ create_draft()

static enrol_lti\local\ltiadvantage\entity\application_registration::create_draft ( string $name,
string $uniqueid,
int $id = null )
static

Factory method to create a draft application registration.

Parameters
string$namethe descriptor for the draft application registration.
string$uniqueida unique identifier for the registration used in place of client_id in the login URI.
int | null$idthe id of the object instance, if being created from an existing store item.
Return values
application_registrationthe application_registration instance.

◆ get_accesstokenurl()

enrol_lti\local\ltiadvantage\entity\application_registration::get_accesstokenurl ( )

Get the access token URL.

Return values
moodle_url|nullthe access token URL.

◆ get_authenticationrequesturl()

enrol_lti\local\ltiadvantage\entity\application_registration::get_authenticationrequesturl ( )

Get the authentication request URL.

Return values
moodle_url|nullthe authentication request URL.

◆ get_clientid()

enrol_lti\local\ltiadvantage\entity\application_registration::get_clientid ( )

Get the client id.

Return values
string|nullthe client id.

◆ get_id()

enrol_lti\local\ltiadvantage\entity\application_registration::get_id ( )

Get the integer id of this object instance.

Will return null if the instance has not yet been stored.

Return values
null|intthe id, if set, otherwise null.

◆ get_jwksurl()

enrol_lti\local\ltiadvantage\entity\application_registration::get_jwksurl ( )

Get the JWKS URL.

Return values
moodle_url|nullthe JWKS URL.

◆ get_name()

enrol_lti\local\ltiadvantage\entity\application_registration::get_name ( )

Get the name of the application being registered.

Return values
stringthe name.

◆ get_platformid()

enrol_lti\local\ltiadvantage\entity\application_registration::get_platformid ( )

Get the platform id.

Return values
moodle_url|nullthe platformid/issuer URL.

◆ get_uniqueid()

enrol_lti\local\ltiadvantage\entity\application_registration::get_uniqueid ( )

Return the local unique client id of the registration.

Return values
stringthe id.

◆ set_accesstokenurl()

enrol_lti\local\ltiadvantage\entity\application_registration::set_accesstokenurl ( \moodle_url $accesstokenurl)

Sets the access token URL for this registration.

Parameters
moodle_url$accesstokenurlthe access token URL.

◆ set_authenticationrequesturl()

enrol_lti\local\ltiadvantage\entity\application_registration::set_authenticationrequesturl ( \moodle_url $authenticationrequesturl)

Sets the authentication request URL for this registration.

Parameters
moodle_url$authenticationrequesturlthe authentication request URL.

◆ set_clientid()

enrol_lti\local\ltiadvantage\entity\application_registration::set_clientid ( string $clientid)

Sets the client id for this registration.

Parameters
string$clientidthe client id
Exceptions
coding_exceptionif the client id is invalid.

◆ set_jwksurl()

enrol_lti\local\ltiadvantage\entity\application_registration::set_jwksurl ( \moodle_url $jwksurl)

Sets the JWKS URL for this registration.

Parameters
moodle_url$jwksurlthe JWKS URL.

◆ set_name()

enrol_lti\local\ltiadvantage\entity\application_registration::set_name ( string $name)

Sets the name of this registration.

Parameters
string$namethe new name to set.
Exceptions
coding_exceptionif the provided name is invalid.

◆ set_platformid()

enrol_lti\local\ltiadvantage\entity\application_registration::set_platformid ( \moodle_url $platformid)

Sets the platformid/issuer for this registration.

Parameters
moodle_url$platformidthe platform id / iss to set.

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