public function serializeUInt8(array $uint8Str = null)
    {
        if (null === $uint8Str) {
            $uint8 = $this->serializeInt(null);
        }
        else {
            // prepend size on 4 bytes
            $count = count($uint8Str);
            $uint8 = $this->serializeInt($count);

            for ($i = 0; $i < $count; $i++) {
                array_push($uint8, $uint8Str[$i]);
            }
        }

        return $uint8;
    }
public function serializeUInt8(array $uint8Str = null)
    {
        if (null === $uint8Str) {
            $uint8 = $this->serializeInt(null);
        }
        else {
            // prepend size on 4 bytes
            $count = count($uint8Str);
            $uint8 = $this->serializeInt($count);

            for ($i = 0; $i < $count; $i++) {
                array_push($uint8, $uint8Str[$i]);
            }
        }

        return $uint8;
    }
public function serializeUInt8 ( array $ uint8Str = null ) { if ( null === $ uint8Str ) { $ uint8 = $ this -> serializeInt ( null ) ; } else { // prepend size on 4 bytes $ count = count ( $ uint8Str ) ; $ uint8 = $ this -> serializeInt ( $ count ) ; for ( $ i = 0 ; $ i < $ count ; $ i ++ ) { array_push ( $ uint8 , $ uint8Str [ $ i ] ) ; } } return $ uint8 ; }
Serialize unsigned char data. The serialized string will be prefixed
with a 4-bytes long Size field followed by the given `str`.

Takes in a 8bit-string and returns an array of Unsigned Integers
on 8-bits.

@internal This method is used internally
@param   string  $str
@return  array       Returns a byte-array with values in UInt8 representation.
Serialize unsigned char data . The serialized string will be prefixed with a 4 - bytes long Size field followed by the given str .