public function on($name, $handler, array $params = [], $append = true)
    {
        $this->ensureBehaviors();

        if (strpos($name, '*') !== false) {
            if ($append || empty($this->_eventWildcards[$name])) {
                $this->_eventWildcards[$name][] = [$handler, $params];
            } else {
                array_unshift($this->_eventWildcards[$name], [$handler, $params]);
            }
            return;
        }

        if ($append || empty($this->_events[$name])) {
            $this->_events[$name][] = [$handler, $params];
        } else {
            array_unshift($this->_events[$name], [$handler, $params]);
        }
    }