function attribute($attribute) { $attributeMap = eZLocale::attributeFunctionMap(); if (isset($attributeMap[$attribute])) { $method = $attributeMap[$attribute]; if (method_exists($this, $method)) { return $this->{$method}(); } else { eZDebug::writeError("Unknown method '{$method}' specified for attribute '{$attribute}'", __METHOD__); return null; } } eZDebug::writeError("Attribute '{$attribute}' does not exist", __METHOD__); return null; }