FreePBX Framework Structure
A good starting place for developers in trying to understand how the internals of FreePBX work is by first understanding that FreePBX was originally called AMP or Asterisk Manager Portal. It was written on PHP 4 with no hind-sight of PHP 5 in mind. Much of it's internal structure is made up of non-OO style programing. This means that many of the functions you will be using in your project are global functions and thus are prefaced with the module's name.
A good example is trying to get route patterns by ID from the core module (Core manages this). As you can guess the function name would probably be something like: