SequoiaDB
 All Classes Files Functions Variables Pages
Public Member Functions | List of all members
SequoiaBinary Class Reference

Public Member Functions

 __construct ($binary, $type)
 
 __toString ()
 

Detailed Description

Class for create an object of the binary type

Constructor & Destructor Documentation

SequoiaBinary::__construct (   $binary,
  $type 
)

Constructor.

Parameters
string$binaryis Base64 encoded string
integer | string$typeis a binary type, range is 0-255
$binObj = new SequoiaBinary( 'aGVsbG8=', '1' ) ;
$arr = array( 'data' => $binObj ) ; // json ==> { "data": { "$binary": "aGVsbG8=", "$type": "1" } }

Member Function Documentation

SequoiaBinary::__toString ( )

PHP Magic Methods, the class as string output.

Returns
Base64 encoded string
$binObj = new SequoiaBinary( 'aGVsbG8=', '1' ) ;
echo $binObj ; // output ==> (1)aGVsbG8=

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