Overview

Namespaces

  • cassandra
  • None
  • PHP
  • phpcassa
    • Batch
    • Connection
    • Index
    • Iterator
    • Schema
      • DataType
    • Util
    • UUID

Classes

  • AsciiType
  • BooleanType
  • BytesType
  • CassandraType
  • CompositeType
  • DateType
  • DoubleType
  • FloatType
  • Int32Type
  • IntegerType
  • LexicalUUIDType
  • LongType
  • TimeUUIDType
  • UTF8Type
  • UUIDType

Interfaces

  • Serialized
  • Overview
  • Namespace
  • Class
  • Tree
 1: <?php
 2: namespace phpcassa\Schema\DataType;
 3: 
 4: /**
 5:  * Stores data as an 4-byte signed integer.
 6:  *
 7:  * @package phpcassa\Schema\DataType
 8:  */
 9: class Int32Type extends CassandraType {
10: 
11:     public function pack($value, $is_name=null, $slice_end=null, $is_data=null)
12:     {
13:         // signed/unsigned doesn't matter when packing
14:         return pack('N', $value);
15:     }
16: 
17:     public function unpack($data, $is_name=null)
18:     {
19:         return current(unpack('l', strrev($data)));
20:     }
21: }
22: 
23: 
phpcassa API documentation generated by ApiGen 2.8.0