Open sylae opened 8 years ago
On this: I think a hybrid of options 2 and 3 would be ideal. The builtin commands will be called via spl_autoload_register()
and composer can load any contributed classes.
Ligrev is currently already "dynamically" (heavy air quotes there) all commands and IQ parsers. In addition, the IQ class system is relatively friendly to extending. Commands, however, probably need a fair amount of work before we can close this.
The big draw to Ligrev should be being able to write your own commands and include them in Ligrev's parser. As we are already using some simple classes, this should not be too hard to extend:
Some options:
$config
. Probably easiest to implement, but not very friendly.spl_autoload_register()
. This way users can just toss command classes into a directory and call it a day. Would take a little bit of work to do, but not too bad.In any case, extending Ligrev in this fashion will require some simple changes, like abstracting away most/all of JAXL's functionality (although this should be done anyway) to a master Ligrev class, or something.