So I must be having a brain fart and need a hand. I'm trying to use BoxPacker in my Codeigniter project to figure out how many items I can fit in some boxes. I've installed BoxPacker into a "application/third_party/boxpacker" folder. But now how do I actually use it?
For some reason my brain is telling me I have to make my own library to interface with the third party programming but then I just have another brain fart and have no clue how to implement it. It's been a long week so I'm pretty burnt out and looking for a hand.
EDIT: So, I created a library named BoxPacker.php with the following code: `
class BoxPacker
{
function __construct()
{
require_once APPPATH."third_party/boxpacker/vendor/autoload.php";
}
}
In my controller I then call:
$this->load->library('BoxPacker');
$packer = new BoxPacker();
But when I try using the functions in the third part code like below, I get the following error Exception: Call to undefined method BoxPacker::addBox()
:
$packer->addBox(new TestBox('Le petite box', 300, 300, 10, 10, 296, 296, 8, 1000));