[eluser]TheFuzzy0ne[/eluser]
[quote author="christian studer" date="1234205680"]Sorry, it doesn't. It is no problem of lower/uppercase, I just tried about every combination I could think of.
In fact the load-function is case insensitive, the model is then aviable as $this->Classname and has usually the same name and case as the class name (Here: Hubconfig).[/quote]
Perhaps I am misunderstanding what you are saying.
Controller - APPPATH/controllers/test.php:
Code:
<?php
class Test extends Controller {
function Test()
{
parent::Controller();
$this->load->model('test_model');
}
function index()
{
}
function test1()
{
echo $this->test_model->get();
// Works great.
}
function test2()
{
echo $this->Test_model->get();
// Doesn't work. Throws the error you're seeing.
}
}
Model - APPPATH/models/test_model.php
Code:
<?php
class Test_model extends Model {
function Test_model()
{
}
function get()
{
return "test string";
}
mydomain.tld/test/test1 - works as expected.
mydomain.tld/test/test2 - throws an error like you're seeing...
Code:
A PHP Error was encountered
Severity: Notice
Message: Undefined property: Test::$Test_model
Filename: controllers/test.php
Line Number: 24
Fatal error: Call to a member function get() on a non-object in /var/www/html/system/application/controllers/test.php on line 24