I have a select() method in a database class, that has an optional boolean argument $sum. This argument is used to say if the method should use
select()
$sum
You could try trigger_error().