Place to put contants in addons?

Permalink
I'd like to have a few contants in one of my addons, but obviously i dont want those in site.php. where would be the proper place to put them? Can i put them in the main controller? In a model file?

fregas
 
olliephillips replied on at Permalink Reply
olliephillips
You don't say if this will be deployed by package. If so the package controllers install method would be ideal:-
<?php
config::save('constant','value');
?>


If not a packaged block, an 'if test' for the constants you need, in the block's on_start method would work. If they're not set, you could set them using the same config::set method call above.

Hope that helps
Mnkras replied on at Permalink Reply
Mnkras
I put them in the on_start method of my package controller