Provides utilities to work with binary data
<?php
$fp = fopen('unit-tests/assets/data.bin', 'wb');
$bin = new Phalcon\Binary\Writer($fp);
$bin->writeUnsignedChar(1);
public __construct ([string|resource $data], [int $endian])
Phalcon\Binary\Writer constructor
public int getEndian ()
Gets the endian
public int getOutput ()
Gets the ouput
public int getContent ()
Gets the ouput
public int getPosition ()
Gets the current postion
public Phalcon\Binary\Writer write (unknown $data, unknown $length)
Write bytes to the current position in the file pointer
public Phalcon\Binary\Writer writeChar (unknown $byte)
Write a signed char to the current position in the file pointer
public Phalcon\Binary\Writer writeUnsignedChar (unknown $byte)
Write a unsigned char to the current position in the file pointer
public Phalcon\Binary\Writer writeInt16 (unknown $num)
Write a signed short int to the current position in the file pointer
public Phalcon\Binary\Writer writeUnsignedInt16 (unknown $num, [unknown $endian])
Write a unsigned short int to the current position in the file pointer
public Phalcon\Binary\Writer writeInt (unknown $num)
Write a signed int to the current position in the file pointer
public Phalcon\Binary\Writer writeUnsignedInt (unknown $num)
Write a unsigned int to the current position in the file pointer
public Phalcon\Binary\Writer writeInt32 (unknown $num)
Write a signed long int to the current position in the file pointer
public Phalcon\Binary\Writer writeUnsignedInt32 (unknown $num, [unknown $endian])
Write a unsigned long int to the current position in the file pointer
public Phalcon\Binary\Writer writeFloat (unknown $num)
Write a float to the current position in the file pointer
public Phalcon\Binary\Writer writeDouble (unknown $num)
Write a double to the current position in the file pointer
public Phalcon\Binary\Writer writeString (unknown $str, [unknown $length], [unknown $exact])
Write string to the current position in the file pointer
public Phalcon\Binary\Writer writeHexString (unknown $str, [unknown $length], [unknown $lowNibble])
Write hex string to the current position in the file pointer