Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

Assert

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

Defines 1 class

InvalidArgumentException:: (4 methods):
  __construct()
  getPropertyPath()
  getValue()
  getConstraints()


Class: InvalidArgumentException  - X-Ref

__construct($message, $code, string $propertyPath = null, $value = null, array $constraints = [])   X-Ref


getPropertyPath()   X-Ref
User controlled way to define a sub-property causing
the failure of a currently asserted objects.

Useful to transport information about the nature of the error
back to higher layers.

return: string|null

getValue()   X-Ref
Get the value that caused the assertion to fail.

return: mixed

getConstraints()   X-Ref
Get the constraints that applied to the failed assertion.

return: array