private function prepareDataBits()
    {
        $n              = $this->structureAppendN;
        $m              = $this->structureAppendM;
        $parity         = $this->structureAppendParity;
        $originalData   = $this->structureAppendOriginalData;

        $dataCounter   = 0;

        if ( $this->checkStructureAppend($n, $m) )
        {
            $dataValue[0]  = 3;
            $dataBits[0]   = 4;

            $dataValue[1]  = $m - 1;
            $dataBits[1]   = 4;

            $dataValue[2]  = $n - 1;
            $dataBits[2]   = 4;

            $originalDataLength = strlen($originalData);

            if ( $originalDataLength > 1 )
            {
                $parity = 0;

                $i      = 0;
                while ($i < $originalDataLength)
                {
                    $parity = ($parity ^ ord(substr($originalData, $i, 1)));
                    $i++;
                }
            }

            $dataValue[3]  = $parity;
            $dataBits[3]   = 8;

            $dataCounter   = 4;
        }

        $dataBits[$dataCounter] = 4;

        return $dataBits;
    }
private function prepareDataBits()
    {
        $n              = $this->structureAppendN;
        $m              = $this->structureAppendM;
        $parity         = $this->structureAppendParity;
        $originalData   = $this->structureAppendOriginalData;

        $dataCounter   = 0;

        if ( $this->checkStructureAppend($n, $m) )
        {
            $dataValue[0]  = 3;
            $dataBits[0]   = 4;

            $dataValue[1]  = $m - 1;
            $dataBits[1]   = 4;

            $dataValue[2]  = $n - 1;
            $dataBits[2]   = 4;

            $originalDataLength = strlen($originalData);

            if ( $originalDataLength > 1 )
            {
                $parity = 0;

                $i      = 0;
                while ($i < $originalDataLength)
                {
                    $parity = ($parity ^ ord(substr($originalData, $i, 1)));
                    $i++;
                }
            }

            $dataValue[3]  = $parity;
            $dataBits[3]   = 8;

            $dataCounter   = 4;
        }

        $dataBits[$dataCounter] = 4;

        return $dataBits;
    }
private function prepareDataBits ( ) { $ n = $ this -> structureAppendN ; $ m = $ this -> structureAppendM ; $ parity = $ this -> structureAppendParity ; $ originalData = $ this -> structureAppendOriginalData ; $ dataCounter = 0 ; if ( $ this -> checkStructureAppend ( $ n , $ m ) ) { $ dataValue [ 0 ] = 3 ; $ dataBits [ 0 ] = 4 ; $ dataValue [ 1 ] = $ m - 1 ; $ dataBits [ 1 ] = 4 ; $ dataValue [ 2 ] = $ n - 1 ; $ dataBits [ 2 ] = 4 ; $ originalDataLength = strlen ( $ originalData ) ; if ( $ originalDataLength > 1 ) { $ parity = 0 ; $ i = 0 ; while ( $ i < $ originalDataLength ) { $ parity = ( $ parity ^ ord ( substr ( $ originalData , $ i , 1 ) ) ) ; $ i ++ ; } } $ dataValue [ 3 ] = $ parity ; $ dataBits [ 3 ] = 8 ; $ dataCounter = 4 ; } $ dataBits [ $ dataCounter ] = 4 ; return $ dataBits ; }
Get Data Bits Array

@return array
Get Data Bits Array