.. SlaxWeb Framework Database - Base Model file, created by Tomaz Lovrec .. highlight:: php .. _database basemodel: Base Model ========== The Base Model provides simple functions to interface with the database. To provide this functionality it depends on other components and libraries that are either the part of the core, or installed along with the component or its subcomponent. Using the Base Model -------------------- To use the Base Model, write your Model class and extend it from **\\SlaxWeb\\Database\\BaseModel**:: `_ * Database Library .. TODO: add link to the class documentation of the Database Library interface in the above line The **Database Library** is available as a service under the name **databaseLibrary.service** in the :ref:`gen topics application`, to obtain other objects, please refer to their own documentations. Using the loader ---------------- To make loading of models as simple as possible, a model loader is provided with the **database** component. The loader is available as a service, and can be obtained with the name **loadDBModel.service**. The loader service is called as a function as it requires the name of the model as input::