protected function process($data)
{
$fakeTag = FakerinoConf::get('fakerinoTag');
/**
* When an element in the configuration is not present,
* FakerinoConf returns an exception.
* Because the Handler needs a null value to continue the chain handling,
* the catch block will intercept that exception.
*/
try {
$elementInConf = FakerinoConf::get($fakeTag);
if (array_key_exists($data->getName(), $elementInConf)) {
$firstChain = self::getFirstChain();
if ($firstChain !== null) {
$classes = array();
foreach ($elementInConf[$data->getName()] as $key => $val) {
$element = new FakeElement($key, $val);
$classes[] = $firstChain->handle($element);
}
return $classes;
}
}
} catch (ConfValueNotFoundException $e) {
}
return;
}