public function on($name, $fn = null, $priority = 0)
    {
        // ( $names )
        if (is_array($name)) {
            foreach ($name as $item => $fn) {
                $this->on($item, $fn);
            }
            return $this;
        }

        // ( $name, $fn, $priority, $data )
        if (!is_callable($fn)) {
            throw new \InvalidArgumentException(sprintf(
                'Expected argument of name callable, "%s" given',
                is_object($fn) ? get_class($fn) : gettype($fn)
            ));
        }

        if (!isset($this->handlers[$name])) {
            $this->handlers[$name] = array();
        }
        $this->handlers[$name][$priority][] = $fn;

        return $this;
    }