I'm creating a custom module which uses a few hooks and then after the form is submitted it will dive into custom PHP interaction that interfaces with an external restful API.
I want some of these variables and functions to be private as they will contain business rules and some variables that I wouldn't want someone to get their hands on (easily).
I'm uncertain of how to do this in Drupal. I understand that I would need to create a PHP class which would then have private/public methods available inside of it. But how do I do this?
Do I build this PHP class in its own file outside of my .module file and then use
files = includes/MyClass.class.php in my .info file to import this external class file in?
Then once it's successfully imported in I could instantiate it with
$something = new MyClass();?
Is it that simple to do, or is there another/better way?