Functions from includes/ now class based

For announcing, describing and discussing code changes to BNT.

Post Reply
thekabal
Posts: 100
Joined: Sat Apr 19, 2014 22:32 UTC

Functions from includes/ now class based

Post by thekabal » Sat May 03, 2014 21:38 UTC

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 23:07 UTC, edited 1 time in total.

thekabal
Posts: 100
Joined: Sat Apr 19, 2014 22:32 UTC

Re: Ibank now class based

Post by thekabal » Sat May 03, 2014 23:06 UTC

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