Overview

Namespaces

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

Interfaces

  • ComplexTypeInterface
  • GMPInterface
  • NumericTypeInterface
  • RationalTypeInterface
  • TypeInterface
  • 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\Interfaces;
11: 
12: /**
13:  * Interface for chippyash\Type GMP types
14:  */
15: interface GMPInterface
16: {
17:     /**
18:      * Return the value of number as a gmp resource, object or array
19:      * May return an array of gmp resource/object
20:      *
21:      * @return \GMP|\resource resource|GMP|array
22:      */
23:     public function gmp();
24:     
25:     /**
26:      * Return number as GMPIntType number.
27:      * Will return floor(n/d)
28:      *
29:      * @return \chippyash\Type\Number\GMPIntType
30:      */
31:     public function asGMPIntType();
32:     
33:     /**
34:      * Return the number as a GMPComplex number i.e. n+0i
35:      *
36:      * @return \chippyash\Type\Number\Complex\GMPComplexType
37:      */
38:     public function asGMPComplex();
39:     
40:     /**
41:      * Return number as GMPRational number.
42:      * NB, numerator and denominator will be caste as GMPIntTypes
43:      *
44:      * @return \chippyash\Type\Number\Rational\GMPRationalType
45:      */
46:     public function asGMPRational();
47: }
48: 
Chippyash Strong Types API documentation generated by ApiGen 2.8.0