@@ 396-404 (lines=9) @@ | ||
393 | * @param integer $type |
|
394 | * @return string |
|
395 | */ |
|
396 | final public static function getSymbolForDataType($type) |
|
397 | { |
|
398 | $types = self::getSupportedDataTypes(); |
|
399 | if (!isset($types[$type])) { |
|
400 | throw new Exception\AMQPOutOfRangeException(sprintf('AMQP-%s doesn\'t support data of type [%s]', self::getProtocol(), $type)); |
|
401 | } |
|
402 | ||
403 | return $types[$type]; |
|
404 | } |
|
405 | ||
406 | /** |
|
407 | * @param string $symbol |
|
@@ 410-418 (lines=9) @@ | ||
407 | * @param string $symbol |
|
408 | * @return integer |
|
409 | */ |
|
410 | final public static function getDataTypeForSymbol($symbol) |
|
411 | { |
|
412 | $symbols = array_flip(self::getSupportedDataTypes()); |
|
413 | if (!isset($symbols[$symbol])) { |
|
414 | throw new Exception\AMQPOutOfRangeException(sprintf('AMQP-%s doesn\'t define data of type [%s]', self::getProtocol(), $symbol)); |
|
415 | } |
|
416 | ||
417 | return $symbols[$symbol]; |
|
418 | } |
|
419 | ||
420 | public function current() |
|
421 | { |