public function base64Encode($number)
    {
        if ($number < 0 || $number > 63) {
            throw new \Exception(sprintf('Invalid number "%s" given. Must be between 0 and 63.', $number));
        }

        return $this->intToCharMap[$number];
    }
public function base64Encode($number)
    {
        if ($number < 0 || $number > 63) {
            throw new \Exception(sprintf('Invalid number "%s" given. Must be between 0 and 63.', $number));
        }

        return $this->intToCharMap[$number];
    }
public function base64Encode ( $ number ) { if ( $ number < 0 || $ number > 63 ) { throw new \ Exception ( sprintf ( 'Invalid number "%s" given. Must be between 0 and 63.' , $ number ) ) ; } return $ this -> intToCharMap [ $ number ] ; }
Encode single 6-bit digit as base64.

@param integer $number

@return string

@throws \Exception If the number is invalid
Encode single 6 - bit digit as base64 .