Framework MVC controllers SHOULD extend the abstract core class AbstractController. Likewise MVC models MAY extend the abstract class AbstractModel:


class FooController extends AbstractController
{
    // <...>
}
 
class FooModel extends AbstractModel
{
    // <...>
}


If a model needs access to the database, it MAY extend the AbstractModel from the StoreCore\Database namespace. Therefore there a two abstract prototypes for models available, one without and one with a database connection:

class FooModel extends \StoreCore\AbstractModel
{
    // <...>
}
 
class BarModel extends \StoreCore\Database\AbstractModel
{
    // <...>
}


The StoreCore abstract DAO (Data Access Object) provides a CRUD interface to Create, Read, Update, and Delete database records. It executes the four basic SQL data manipulation operations: INSERT, SELECT, UPDATE, and DELETE. Model classes that extend the abstract DAO MUST provide two class constants for late static bindings: a TABLE_NAME with the database table name the model operates on and a PRIMARY_KEY for the primary key column of this table.