public function findHookInDefinition(array $hooksDef, $type, $file, $class, $method)
    {
        foreach ($hooksDef as $defFile => $hooks) {
            if (!array_key_exists($type, $hooks)) {
                continue;
            }

            // Find a hook
            foreach ($hooks[$type] as $hook) {
                if ($hook[2] == $file && $hook[3] == $class && $hook[4] == $method) {
                    return $defFile;
                }
            }
        }
    }