Loading model from _cp file produces lowercase named object in EE, but loading the same model from core module file produces an object with first letter capitalized…
//mcp.myclass.php
class Myclass_mcp {
function __construct() {
$this->EE =& get_instance();
}
function index() {
$this->EE->load->model('My_model');
$data = $this->EE->my_model->get_data();
}
}
//mod.myclass.php
class Myclass {
function __construct() {
$this->EE =& get_instance();
}
function index() {
$this->EE->load->model('My_model');
$data = $this->EE->My_model->get_data();// this is incorrect
}
}Hi rusk,
I’m afraid we aren’t set up to offer support when it comes to add-on development. I’ll bring this up to the developers so they can look into it. Thanks for bringing this to our attention.
I’m going to move this into Development and Programming so the discussion can continue.
Cheers!
you can just load the model with the lowercase class name
thanx. Just searched the documentation and didn’t found strict rules for names capitalisation except for classname declaration. Models usage is not covered by EE documentation too.
I’m afraid we aren’t set up to offer support when it comes to add-on development.
Great. It was not support request. It was a bug report.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.