Welcome Guest, Not a member yet? Register   Sign In
Error Abstract Classes
#1

Hi. I'm having a problem with abstract classes.

At first, I have this controller in my app which 

class Observations extends MY_Controller
{
    function __construct(){
        parent::__construct();
        $this->load->model('Observation_model');

    }
}

And this is the class that it's calling the controller.

abstract class Observation_model extends CI_Model
{
    const LEAD_OBSERVATION = 0;
    const CLIENT_OBSERVATION = 1;

    protected $id_situacion;
    protected $id_user;
}

When I execute it, php shows this error:

Fatal error: Cannot instantiate abstract class Observation_model in C:\xampp\htdocs\Projects\operarme\system\core\Loader.php

My quiestion is if I can abstract a model and How could I abstract it?

Thanks.
Reply
#2

You can't.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB