Antidot PHP API  version 0.16.0
##PHP API to simplify integration of Antidot components
 All Classes Files Functions Variables Groups Pages
Public Member Functions | List of all members
AfsFeedCoder Class Reference

Default feed coder implementation. More...

Inheritance diagram for AfsFeedCoder:
AfsCoderBase AfsCoderInterface

Public Member Functions

 __construct ($value_separator='_', $escape_character='|')
 Construct new instance.
 encode (array $feeds)
 Encode feeds.
 decode ($feeds)
 Decode feeds from string.

Additional Inherited Members

- Protected Member Functions inherited from AfsCoderBase
 check_unicity (array $params)
 Check unicity of provided params.
 explode ($sep, $value)
 Split provided value.
 replace ($pattern, $replacement, $value)
 Simple wrapper which add surrounding regex delimiters.

Detailed Description

Default feed coder implementation.

Constructor & Destructor Documentation

__construct (   $value_separator = '_',
  $escape_character = '|' 
)

Construct new instance.

Parameters
$value_separator[in] character used to separate values.
$escape_character[in] character to escape character when feeds contains previous separator.
Exceptions
InvalidArgumentExceptionwhen value_separator and escape_character are not strictly different.

Reimplemented from AfsCoderBase.

Member Function Documentation

decode (   $feeds)

Decode feeds from string.

Parameters
$feeds[in] string representing list of feeds.
Returns
list of feeds.

Implements AfsCoderInterface.

encode ( array  $feeds)

Encode feeds.

Parameters
$feeds[in] List of feeds
Returns
string encoded feeds

Implements AfsCoderInterface.