ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 53 of file TypeMismatchException.php.

References $code, $message, and $type.

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

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