public function handlers()
{
if (!$this->_handlersLoaded) {
foreach (new DirectoryIterator(__DIR__ . '/Alarm/Handler') as $file) {
if (!$file->isFile() || substr($file->getFilename(), -4) != '.php') {
continue;
}
$handler = Horde_String::lower($file->getBasename('.php'));
if (isset($this->_handlers[$handler])) {
continue;
}
require_once $file->getPathname();
$class = 'Horde_Alarm_Handler_' . $file->getBasename('.php');
if (class_exists($class, false)) {
$this->addHandler($handler, new $class());
}
}
$this->_handlerLoaded = true;
}
return $this->_handlers;
}