rmccue/WP-Parser — pull request #117 by pdclark (2014-06-30 15:40:55+00:00)
Title: p2p relationships

This PR isn't complete, but it should be far enough for feedback and iteration.

Import of relationships between functions and other functions is working.

I hit a stopping point when moving on to connecting hooks and methods — it looked like the "uses" array wasn't being populated with those yet.

The `wp_p2p` and `wp_p2pmeta` tables aren't cleared before import. In production, it may be wise to clear out old imported entries before re-importing. For example, if a function is removed from use somewhere, we wouldn't want that relationship to still show up. Seems like deleting all rows with the relevant `p2p_type` would be sufficient. If we wanted to be ultra-safe, an "imported" meta could be set in `p2p_meta` to avoid hitting manual connections.