Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

(no description)

File Size: 294 lines (12 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: application_registration_repository  - X-Ref

Class application_registration_repository.

application_registration_from_record(\stdClass $record)   X-Ref
Create an application_registration instance from a record.

return: application_registration an application_registration instance.
param: \stdClass $record the record.

application_registrations_from_records(array $records)   X-Ref
Get an array of application_registration instances from a set of records.

return: array|application_registration[] the array of object instances.
param: \stdClass[] $records the array of records.

record_from_application_registration(application_registration $appregistration)   X-Ref
Convert the application_registration object into a stdClass for use with the data store.

return: \stdClass the record.
param: application_registration $appregistration the app registration.

get_unique_index_hash(string $platformid, string $clientid)   X-Ref
Gets a hash of the {platformid, clientid} tuple for use in indexing purposes.

return: string a SHA256 hash.
param: string $platformid the platformid of the registration.
param: string $clientid the clientid of the registration

find(int $id)   X-Ref
Find a registration by id.

return: null|application_registration the registration object if found, otherwise null.
param: int $id the id of the application registration.

find_all()   X-Ref
Get all app registrations in the repository.

return: application_registration[] the array of application registration instances.

find_by_platform_uniqueid(string $platformid, string $uniqueid)   X-Ref
Find a registration by its unique {platformid, uniqueid} tuple.

return: application_registration|null application registration instance if found, else null.
param: string $platformid the url of the platform (the issuer).
param: string $uniqueid the locally uniqueid of the tool registration.

find_by_uniqueid(string $uniqueid)   X-Ref
Find a registration by its uniqueid.

return: application_registration|null application_registration instance if found, else null.
param: string $uniqueid the uniqueid identifying the registration.

find_by_platform(string $platformid, string $clientid)   X-Ref
Find a registration by its unique {platformid, clientid} tuple.

return: application_registration|null application registration instance if found, else null.
param: string $platformid the url of the platform (the issuer).
param: string $clientid the client_id of the tool registration on the platform.

find_by_deployment(int $deploymentid)   X-Ref
Find an application_registration corresponding to the local id of a given tool deployment.

return: application_registration|null the application_registration instance or null if not found.
param: int $deploymentid the local id of the tool deployment object.

save(application_registration $appregistration)   X-Ref
Save an application_registration instance to the store.

return: application_registration the saved application registration instance.
param: application_registration $appregistration the application registration instance.

exists(int $appregid)   X-Ref
Report whether an application_registration with id $id exists or not.

return: bool true if the object exists, false otherwise.
param: int $appregid the id of the application_registration

delete(int $id)   X-Ref
Delete the application_registration identified by id.

param: int $id the id of the object to delete.