# \nre\coreModel

Abstract class for implementing a Model.

## Summary

Methods
Properties
Constants
load()
factory()
No public properties found
No constants found
__construct()
No protected properties found
N/A
getClassName()
loadModels()
No private properties found
N/A
abstract

File
  core/Model.inc
Package
  Default
Class hierarchy
  \nre\core\Model

## Tags

author | coderkun olli@coderkun.de

## Methods

### load()

    load(string  $modelName)

Load the class of a Model.

#### Parameters

string | $modelName | Name of the Model to load

#### Throws

\nre\exceptions\ModelNotFoundException
\nre\exceptions\ModelNotValidException

#

static

## Tags

None found

### factory()

    factory(string  $modelName)

Instantiate a Model (Factory Pattern).

#### Parameters

string | $modelName | Name of the Model to instantiate

#

static

## Tags

None found

### __construct()

    __construct()

Construct a new Model.

TODO Catch exception

#### Throws

\nre\exceptions\DatamodelException
\nre\exceptions\DriverNotFoundException
\nre\exceptions\DriverNotValidException
\nre\exceptions\ModelNotValidException
\nre\exceptions\ModelNotFoundException

#

## Tags

None found

### getClassName()

    getClassName(string  $modelName) : string

Determine the classname for the given Model name.

#### Parameters

string | $modelName | Model name to get classname of

#### Returns

string —

Classname fore the Model name

#

static

## Tags

None found

### loadModels()

    loadModels()

Load the Models of this Model.

#### Throws

\nre\exceptions\DatamodelException
\nre\exceptions\DriverNotFoundException
\nre\exceptions\DriverNotValidException
\nre\exceptions\ModelNotValidException
\nre\exceptions\ModelNotFoundException

#

## Tags

None found

### Model.inc