function attachListener($listener, $name = null, $priority = 10)
    {
        if ($priority == null)
            $priority = 10;

        if ($this->_tmp__isEmiting)
            throw new \RuntimeException('Can`t Attach Listener While Emit Events.');

        if ( is_int($name) ) {
            ## listener without specified name
            $priority = $name;
            $name     = null;
        }

        if ($name === null) {
            ## achieve default name if given listener is class
            if (is_object($listener) && !$listener instanceof \Closure)
                $name = get_class($listener);
        }
        
        if ($name !== null) {
            ## store listener with name, listener is not anonymous!
            if (isset($this->_c_listeners[$name]))
                throw new \RuntimeException("Listener with same name ({$name}) not allowed.");

            $this->_c_listeners[$name] = $listener;
        }

        $this->_listenerQueue()->insert($listener, $priority);
        return $this;
    }