Interface Inx_Api_Property_Property

Description

Mailing lists have properties, which control the list behaviour.

Mailing lists have properties, which control the list behaviour. An Inx_Api_Property_Property may control, for example, the default mail encoding, the maximal sending performance, or settings used by features, such as the hard bounce threshold. The properties can be accessed through the Inx_Api_List_ListContext::findProperty($sPropertyName) and Inx_Api_List_ListContext::selectProperties() methods. The following snippet shows how to retrieve a specific property, namely the mail encoding property:

 $oListContext = ...
 $oProperty = $oListContext->findProperty( Inx_Api_Property_PropertyNames::MAIL_ENCODING );
 echo $oProperty->getInternalValue();
Note: Not all properties are available for all lists. The Inx_Api_Property_PropertyNames interface documentation states, which properties are available for which lists.

The following snippet shows how to retrieve all properties of a list:

 $oBOResultSet = $oListContext->selectProperties();

 for( $i = 0; $i < $oBOResultSet->size(); $i++ )
 {
 	$oProperty = $oBOResultSet->get( $i );
 	echo $oProperty->getName()."<br>";
 }

 $oBOResultSet->close();

The following snippet shows how to change the locale of a specific list to English:

 $oListContext = $oSession->getListContextManager()->findByName( "Desired list" );

 $oProperty = $oListContext->findProperty( Inx_Api_Property_PropertyNames::FORMAT_LOCALE );
 $oProperty->updateInternalValue( "en" );
 $oProperty->commitUpdate();

Most of the properties can be set easily as the values are simple numbers or strings (see above). However, there are two special properties which require a bit more effort to be set correctly:

  1. Inx_Api_Property_PropertyNames::APPROVAL_ACTIVE: Defines the approval method and the approvers.
  2. Inx_Api_Property_PropertyNames::MAIL_FORMAT_CHOICE: Defines the default mailing format.
These two properties have a special internal value syntax. To ease the setting of these two properties, there are two formatters used to parse and create the internal values:
  1. Inx_Api_Property_PropertyFormatter for the approval property.
  2. Inx_Api_Property_FormatChoicePropertyFormatter for the mail format property.
An Inx_Api_Property_PropertyFormatter instance can be obtained using the getFormatter() method. The Inx_Api_Property_FormatChoicePropertyFormatter offers static methods for conversion instead. For examples on how to use the formatters, see their respective documentation.

Note: Several api user rights are required to use properties, depending on which properties shall be retrieved/manipulated. See the PROPERTY_* constants in the Inx_Api_UserRights documentation.

Located in /Api/Property/Property.php (line 77)

Inx_Api_BusinessObject
   |
   --Inx_Api_Property_Property
Class Constant Summary
Method Summary
Methods
getFormatter (line 124)

Returns the Inx_Api_Property_PropertyFormatter instance used to format the Inx_Api_Property_PropertyNames::APPROVAL_ACTIVE property.

Returns the Inx_Api_Property_PropertyFormatter instance used to format the Inx_Api_Property_PropertyNames::APPROVAL_ACTIVE property.

  • return: the PropertyFormatter used to format the approval property.
  • since: API 1.6.0
  • access: public
getInternalValue (line 101)

Returns the value of the property.

Returns the value of the property.

  • return: the value of the property.
  • access: public
string getInternalValue ()
getName (line 93)

Returns the name of the property.

Returns the name of the property.

string getName ()
updateInternalValue (line 114)

Updates the value of the property.

Updates the value of the property. For the Inx_Api_Property_PropertyNames::APPROVAL_ACTIVE property use the Inx_Api_Property_PropertyFormatter provided by getFormatter()<i>. For the <i>Inx_Api_Property_PropertyNames::MAIL_FORMAT_CHOICE<i> property use the <i>Inx_Api_Property_FormatChoicePropertyFormatter.

  • access: public
void updateInternalValue (string $sValue)
  • string $sValue: the value of the property.

Inherited Methods

Inherited From Inx_Api_BusinessObject

Inx_Api_BusinessObject::commitUpdate()
Inx_Api_BusinessObject::getId()
Inx_Api_BusinessObject::reload()
Class Constants
ATTRIBUTE_VALUE = 1 (line 84)

Constant for the property value attribute.

Constant for the property value attribute. Used by the UpdateException to indicate the error source.

  • see: getErrorSource()

Documentation generated on Thu, 17 Sep 2015 14:27:28 +0200 by phpDocumentor 1.3.2