ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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.

References $code, $message, and $type.

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  }
$type
$code
Definition: example_050.php:99
catch(Exception $e) $message

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