Overview

Namespaces

  • chippyash
    • Type
      • Exceptions
      • Interfaces
      • Number
        • Complex
        • Rational
      • String

Exceptions

  • GmpNotSupportedException
  • InvalidTypeException
  • NotRealComplexException
  • Overview
  • Namespace
  • Class
  • Tree
 1: <?php
 2: /**
 3:  * Hard type support
 4:  * For when you absolutely want to know what you are getting
 5:  *
 6:  * @author Ashley Kitson <akitson@zf4.biz>
 7:  * @copyright Ashley Kitson, UK, 2014
 8:  * @licence GPL V3 or later : http://www.gnu.org/licenses/gpl.html
 9:  */
10: namespace chippyash\Type\Exceptions;
11: 
12: /**
13:  * Invalid type exception
14:  */
15: class InvalidTypeException extends \Exception
16: {
17: 
18:     protected $msg = 'Invalid Type: %s';
19: 
20:     /**
21:      * @inheritDoc
22:      * @param string $type Name of invalid type
23:      * @param int $code
24:      * @param \Exception $previous
25:      */
26:     public function __construct($type, $code = null, $previous = null)
27:     {
28:         parent::__construct(sprintf($this->msg, $type), $code, $previous);
29:     }
30: }
31: 
Chippyash Strong Types API documentation generated by ApiGen 2.8.0