protected function hookExists($className, array $hookData)
    {
        $class = preg_replace('/^.*\\\(.*)$/', '$1', $className);

        foreach ($hookData as $hookData) {
            if (preg_match('/\\\\'.$class.'$/', $hookData['className'])) {
                return true;
            }
        }

        return false;
    }