Horde_Alarm::handlers PHP Method

handlers() public method

The returned list is a hash with method names as the keys and optionally associated parameters as values. The parameters are hashes again with parameter names as keys and parameter information as values. The parameter information is hash with the following keys: 'desc' contains a parameter description; 'required' specifies whether this parameter is required.
public handlers ( ) : array
return array List of methods and parameters.
    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;
    }