phpCAS  version 1.4.0
TypeMismatchException.php
Go to the documentation of this file.
1 <?php
2 
42 {
54  public function __construct (
55  $argument, $argumentName, $type, $message = '', $code = 0
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  }
69 }
70 ?>
__construct( $argument, $argumentName, $type, $message='', $code=0)