Xsecrets wrote:
Speaking of array_merging the language data is it working for you in 1.5? for some reason the few times I've tried it it hasn't worked for me, but I've been in to big of a rush to try to figure out why.
Also I don't really get the whole it has to be a 100% proper framework. It's not like he's releasing the framework separately.
Yea I've used the array_merge in all my payment modules with no issue
As far as the framework.. I think the way things are now, keeping it separate just adds thousands of redundant lines of code. But I see his point of doing it the right way.
I think the issue is that there needs to be another layer that interfaces with the system library from the application side. The application needs its own libraries and the system/library should be generic classes instead of a mix of application specific libraries like the currency library.
For example....
The mail.php file is written as a class, but it is annoying that we need to use:
Code: Select all
$mail = new Mail();
$mail->protocol = $this->config->get('config_mail_protocol');
$mail->parameter = $this->config->get('config_mail_parameter');
$mail->hostname = $this->config->get('config_smtp_host');
$mail->username = $this->config->get('config_smtp_username');
$mail->password = $this->config->get('config_smtp_password');
$mail->port = $this->config->get('config_smtp_port');
$mail->timeout = $this->config->get('config_smtp_timeout');
$mail->setFrom($this->config->get('config_email'));
$mail->setSender($order_query->row['store_name']);
everytime we want to send a simple email.
This default configuration should be handled somewhere else like the model/tool area. Then we could just call
$this->model_tool_mail->sendMail('
me@you.com', $msg);
similarly a language tool library should be made that handles the fallback and merge so you can just do:
$this->model_tool_language->load('product/product'); and it will handle the merging and fallback, while leaving the generic language class in the system/library folder alone.
I think the problem is that we try to use classes as if they were shared libraries and it just isn't working well since classes have to be fully initialized each time.