Code navigator - REST or API question |
|
I ended up doing this a sneaky way which seems to work nicely.
Defined my classes in a seperate PHP file to keep things tidy and created a class for each type of API call - Do,POST,Get,Delete, etc etc Then I defined a final class to create an object with each of the classes i.e. in affect you end up with $intranet_api->DO->securityLogin(); which looks rather nice class api_do_functions { function securityLogin() { } function securityLogout() { } } class api_post_functions { } class api_functions { function __construct() { $this->DO = new api_do_functions(); $this->POST = new api_post_functions(); } } $intranet_api = new api_functions(); |
||||||||||||
|
Code navigator - REST or API question |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by