I have a class definition like:
class JConfig {
var $offline = '0';
var $editor = 'tinymce';
var $list_limit = '20';
var $helpurl = 'http://help.joomla.org';
var $log_path = '/path/to/logs';
// ....
}
I want to dinamically define '$log_path'
I've tried to define a constant outside the class declaration but no look with that
Example:
if(!defined('ROOT_PATH')){
define('ROOT_PATH', dirname(__FILE__));
}
class JConfig {
var $offline = '0';
var $editor = 'tinymce';
var $list_limit = '20';
var $helpurl = 'http://help.joomla.org';
var $log_path = ROOT_PATH . '/logs'; // This generate a error
// ....
}
But i can not do that, so the question is, is there a way to accomplish this?