ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
CAS_TypeMismatchException Class Reference
+ Inheritance diagram for CAS_TypeMismatchException:
+ Collaboration diagram for CAS_TypeMismatchException:

Public Member Functions

 __construct ( $argument, $argumentName, $type, $message='', $code=0)
 Constructor, provides a nice message. More...
 

Detailed Description

Definition at line 40 of file TypeMismatchException.php.

Constructor & Destructor Documentation

◆ __construct()

CAS_TypeMismatchException::__construct (   $argument,
  $argumentName,
  $type,
  $message = '',
  $code = 0 
)

Constructor, provides a nice message.

Parameters
mixed$argumentArgument
string$argumentNameArgument Name
string$typeType
string$messageError Message
integer$codeCode
Returns
void

Definition at line 54 of file TypeMismatchException.php.

56 {
57 if (is_object($argument)) {
58 $foundType = get_class($argument).' object';
59 } else {
60 $foundType = gettype($argument);
61 }
62
63 parent::__construct(
64 'type mismatched for parameter '
65 . $argumentName . ' (should be \'' . $type .' \'), '
66 . $foundType . ' given. ' . $message, $code
67 );
68 }
$code
Definition: example_050.php:99

References $code.


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