Exemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function toPhonetic(HexFormatContext $context)
 {
     $context->setCurrentNibble($this);
     if ($this->isNumeric()) {
         return NumericHexFormatter::getInstance()->format($this);
     }
     return NibbleEnum::find($this, $context->isFirstNibble());
 }
Exemplo n.º 2
0
 /**
  * Return empty string for null nibbles
  *
  * @param HexFormatContext $context
  * @return string
  */
 public function toPhonetic(HexFormatContext $context)
 {
     $context->setCurrentNibble($this);
     return '';
 }