How to manage settings

This can be done through the Property and PropertyPeer? classes.

PropertyPeer::set('name', 'Symfonyac');
PropertyPeer::set('series', array('Internet' => 'MHNET-', 'Diseño' => 'MHDSN-'));
PropertyPeer::set('taxes', array('IVA 16%' => 16.0, 'IVA 7%' => 7.0, 'IVA 4%' => 4.0, 'IRPF 15%' => 15.0, 'XYZT' => 0.7));

$name   = PropertyPeer::get('name');
$series = PropertyPeer::get('series', array());
$taxes  = PropertyPeer::get('taxes', 'default_value');

A setting is saved into the property table. The key field is the PK of the table. Through this methods we ensure that we are not trying to duplicate an entry on this table.

Setting values are saved in JSON format because serialize function does not treat non-standard characters very well.