Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

(no description)

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

Defines 1 class


Class: deployment_repository  - X-Ref

The deployment_repository class.

record_from_deployment(deployment $deployment)   X-Ref
Create a valid record from a deployment instance.

param: deployment $deployment the deployment.
return: \stdClass a compatible record.

deployments_from_records(array $records)   X-Ref
Create a list of deployments based on a list of records.

param: array $records an array of deployment records.
return: deployment[]

deployment_from_record(\stdClass $record)   X-Ref
Create a valid deployment from a record.

param: \stdClass $record the record.
return: deployment the deployment instance.

save(deployment $deployment)   X-Ref
Save a deployment to the store.

param: deployment $deployment the deployment instance to save.
return: deployment the saved deployment instance.

find(int $id)   X-Ref
Find and return a deployment, by id.

param: int $id the id of the deployment to find.
return: deployment|null

exists(int $id)   X-Ref
Determine whether a deployment exists in the repository.

param: int $id the identifier of the deployment
return: bool true if the deployment exists, false otherwise.

delete(int $id)   X-Ref
Delete a deployment from the store.

param: int $id the id of the deployment object to remove.

delete_by_registration(int $registrationid)   X-Ref
Delete all deployments for the given registration.

param: int $registrationid the registration id.

count_by_registration(int $registrationid)   X-Ref
Return a count of how many deployments exists for a given application_registration.

param: int $registrationid the id of the application_registration instance.
return: int the number of deployments found.

find_by_registration(int $registrationid, string $deploymentid)   X-Ref
Get a deployment based on its deploymentid and a for a given application registration id.

param: int $registrationid the id of the application_registration to which the deployment belongs.
param: string $deploymentid the deploymentid of the deployment, as set by the platform.
return: deployment|null deployment if found, otherwise null.

find_all_by_registration(int $registrationid)   X-Ref
Get all deployments for a given application registration id.

param: int $registrationid the id of the application_registration to which the deployment belongs.
return: deployment[]|null deployments if found, otherwise null.