Manage data as an attribute.

Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
Remove unused variable.
Rename parameter.
Update PHPDoc.
Fix data parsing.

Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>