0

I can't figure this out for the life of me. They recommend using Composer to get their PHP API Client up and running, but I'm wondering if I have to, because it's been a pain in the butt. Here's their installation instructions:

Install Composer curl -sS https://getcomposer.org/installer | php

Add Lob.com PHP client as a dependency composer require lob/lob-php

From what I understand, my host (InMotion Hosting/cPanel) does in fact support the Composer installation, but they won't offer help on how to install it. Can somebody break this down for me? Or is there a way to use this PHP API without Composer?

As always, thanks for the help.

Aaron
  • 531
  • 3
  • 8
  • 22
  • Are you using any kind of framework on the site? – khartnett Oct 08 '18 at 20:47
  • @khartnett At this point I just downloaded everything from GitHub, uploaded it to my server, and I'm trying to get one of their examples to execute on my server. When I run their examples, they are looking for "vendor/autoload.php", which is a Composer situation if I'm correct. – Aaron Oct 08 '18 at 20:53
  • That's correct. If you require the "vendor/autoload.php" file, it should make the package classes available in your code – khartnett Oct 08 '18 at 21:05
  • There 'might' be a way to do this without composer, but honestly I don't think it would be at all easier. – khartnett Oct 08 '18 at 21:27
  • If you download their source code and use an Autoloader of your own, should be no problem. Just so happens I have an Autoloader on [GitHub](https://github.com/ArtisticPhoenix/Autoloader) ... lol – ArtisticPhoenix Oct 08 '18 at 21:59
  • @ArtisticPhoenix Wow, cool. Do I need to do any editing with something like this or do I just include the file in the PHP? – Aaron Oct 08 '18 at 23:18
  • You just include it, it's documented on github. You may have to `registerPath` but that depends on where the autloader is, and where the classes are etc... – ArtisticPhoenix Oct 08 '18 at 23:39

0 Answers0