Functions from includes/ now class based

For announcing, describing and discussing code changes to BNT.

Post Reply
thekabal
Posts: 91
Joined: Sat Apr 19, 2014 10:32 pm

Functions from includes/ now class based

Post by thekabal » Sat May 03, 2014 9:38 pm

I spent half the day (roughly) moving the ibank functions from includes/ into classes/BadIbank.php . That file contains the new "mega" class BadIbank, which contains all the ibank functions.

I purposefully prefixed it "Bad", because it doesn't conform to our goals for classes. Ideally, a method in a class should have no globals, a clearly defined input and output, decent commenting, and so forth.

BadIbank breaks pretty much all of those rules and others. However, I wanted to get us to a point where the includes/ directory was gone, and functions belong in classes that are auto-loaded.

Its a step in that direction.
Last edited by thekabal on Sat May 03, 2014 11:07 pm, edited 1 time in total.

thekabal
Posts: 91
Joined: Sat Apr 19, 2014 10:32 pm

Re: Ibank now class based

Post by thekabal » Sat May 03, 2014 11:06 pm

And continued on, and now all functions from includes are in Bad* classes in classes/!

The includes directory is gone, and composer has been updated.

Feels weird to have actually finished that problem off! :)

Post Reply