|
SAMMessage::headerThe header properties of the message. Descriptionobject$SAMMessage->header;
The header property is a container for any system or user properties that area associated with the message. Properties may be assigned by the sender of a message to control the way the messaging systems handles it or may be assigned by the messaging system itself to tell the recipient extra information about the message or the way in which it has been handled. Some properties are understood by SAM in which case constants have been defined for them. The majority of properties however are ignored by the SAM implementation and simply passed through to the underlying messaging systems allowing the application to use messaging specific property names or to define its own "user" properties. The SAM defined properties are as follows:
When setting the values of properties it is often useful to give a hint as to the format in which the property should be delivered to the messaging system. By default property values are delivered as text and the following simple syntax may be used to set a value:
Example #1 Setting a text format property using the default syntax
<?php If it is desired to pass type information an alternative syntax may be used where the value and the type hint are passed in an associative array:
Example #2 Setting a text format property using a type hint
<?php When passing a type hint the type entry should be one of the SAM defined constant values as defined by the following table:
Examples
Example #3 Setting properties as the sender of a message
<?php
Example #4 Retreiving property values from a message
<?php |