public function readSigned(&$br)
    {
        $this->setEndianBig('s');
        $this->setEndianLittle('s');

        $value = $this->read($br);

        $this->setEndianBig('n');
        $this->setEndianLittle('v');

        $endian = new Endian();
        if ($br->getMachineByteOrder() != Endian::ENDIAN_LITTLE && $br->getEndian() == Endian::ENDIAN_LITTLE) {
            return $endian->convert($value);
        } else {
            return $value;
        }
    }
public function readSigned(&$br)
    {
        $this->setEndianBig('s');
        $this->setEndianLittle('s');

        $value = $this->read($br);

        $this->setEndianBig('n');
        $this->setEndianLittle('v');

        $endian = new Endian();
        if ($br->getMachineByteOrder() != Endian::ENDIAN_LITTLE && $br->getEndian() == Endian::ENDIAN_LITTLE) {
            return $endian->convert($value);
        } else {
            return $value;
        }
    }
public function readSigned ( & $ br ) { $ this -> setEndianBig ( 's' ) ; $ this -> setEndianLittle ( 's' ) ; $ value = $ this -> read ( $ br ) ; $ this -> setEndianBig ( 'n' ) ; $ this -> setEndianLittle ( 'v' ) ; $ endian = new Endian ( ) ; if ( $ br -> getMachineByteOrder ( ) != Endian :: ENDIAN_LITTLE && $ br -> getEndian ( ) == Endian :: ENDIAN_LITTLE ) { return $ endian -> convert ( $ value ) ; } else { return $ value ; } }
Returns a Signed 16-bit Integer

@param  \PhpBinaryReader\BinaryReader $br
@return int
Returns a Signed 16 - bit Integer