1:  2:  3:  4:  5:  6:  7:  8:  9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 
<?php

namespace SAREhub\Client\Amqp;

/**
 * Enum for all supported AMQP headers sets in Exchange messages.
 */
class AmqpMessageHeaders
{

    const CONSUMER_TAG = 'amqp_consumer_tag';
    const DELIVERY_TAG = 'amqp_delivery_tag';
    const REDELIVERED = 'amqp_redelivered';
    const EXCHANGE = 'amqp_exchange';
    const ROUTING_KEY = 'amqp_routing_key';

    const CONTENT_TYPE = 'amqp_content_type';
    const CONTENT_ENCODING = 'amqp_content_encoding';
    const REPLY_TO = 'amqp_reply_to';
    const CORRELATION_ID = 'amqp_correlation_id';
    const PRIORITY = 'amqp_priority';

    private static $headers = [
        self::CONSUMER_TAG,
        self::DELIVERY_TAG,
        self::REDELIVERED,
        self::EXCHANGE,
        self::ROUTING_KEY,
        self::CONTENT_TYPE,
        self::CONTENT_ENCODING,
        self::REPLY_TO,
        self::CORRELATION_ID,
        self::PRIORITY
    ];

    private static $propertyHeaders = [
        self::CONTENT_TYPE,
        self::CONTENT_ENCODING,
        self::REPLY_TO,
        self::CORRELATION_ID,
        self::PRIORITY
    ];

    public static function getMessagePropertyName($header)
    {
        return substr($header, 5);
    }

    /**
     * @return array
     */
    public static function getAll()
    {
        return self::$headers;
    }

    /**
     * @return array
     */
    public static function getPropertyHeaders()
    {
        return self::$propertyHeaders;
    }
}