Welcome Guest, Not a member yet? Register   Sign In
Model Doesnt Load..!
#1

[eluser]ashipj[/eluser]
I have code
Code:
$this->load->model('DTO/ResponseDTO');
in my controller and i have my ResponseDTO.php class in "model/DTO" directory.

But when i run the application. I get the error
Code:
Fatal error: Class 'Responsedto' not found in C:\Program Files\xampp\htdocs\php\libraries\Loader.php on line 184


Its just for this class. Other Model classes are loading fine. Is it anything with the name or something..?

Thanks for reading
#2

[eluser]Jan_1[/eluser]
codeigniter.: styleguide: class_and_method_naming
does this help you?
#3

[eluser]ashipj[/eluser]
Thanks Jan... But i believe those are just naming conventions. Even if you use "ClassName" instead of "Class_name", It should work fine(or am i wrong here..?). Also all my other classes (like UserDTO, ProfileDTO etc..) follow the same pattern.

Any idea, on which cases such error message is displayed?
#4

[eluser]Jan_1[/eluser]
How does the head of your ResponseDTO.php look like?
#5

[eluser]ashipj[/eluser]
This is how my ResponseDTO.php would look like.

Code:
<?
class ResponseDTO extends Model
{
    var $blank;
    function ResponseDTO()
    {
        parent::Model();
    }    
}
?>
#6

[eluser]InsiteFX[/eluser]
Where Model_name is the name of your class. Class names must have the first letter capitalized
with the rest of the name lowercase. Make sure your class extends the base Model class.

InsiteFX




Theme © iAndrew 2016 - Forum software by © MyBB