NDB_BVL_Instrument::factory does too much #6866
Labels
Discussion Required
PR or issue awaiting the resolution of a discussion between all involved parties
Meta
PR does something that organizes, upgrades, or manages the functionality of the codebase
Proposal
PR or Issue suggesting an improvement that can be accepted, rejected or altered
The doc comment for
NDB_BVL_Instrument::factory
currently reads:However, it does much more than that, with many assumptions about the fact that the only way
an instrument might be used is in the frontend (and not, say, to work with the instrument data in a script.)
It:
setupCandidateInfoTables
function (which seems to only set some smarty template variables, but as a side-effect calls Candidate::singleton and Timepoint::singleton which loads all data for a candidate and a timepoint. (This should only be done somewhere more appropriate like thehandle
function which is only called when accessed from the frontend.)loadInstrumentFile
andloadInstrumentRules
. (These are no-ops for the default instrument class so probably not a big deal, but should at least be documented in the function doc)It seems likely that
setup
itself will also eventually have to be renamed or removed, because of signature conflicts with the NDB_Pagesetup
in the class hierarchy.The text was updated successfully, but these errors were encountered: