# \hhu\z\modelsSeminarycharacterfieldsModel

Model to interact with the Seminarycharacterfields-tables.

## Summary

Methods
Properties
Constants
__construct()
load()
factory()
getFieldsForSeminary()
setSeminaryFieldOfCharacter()
getSeminaryFieldOfCharacter()
getFieldsForCharacter()
No public properties found
No constants found
No protected methods found
$db
N/A
loadDriver()
connect()
getClassName()
loadModels()
No private properties found
N/A

File
  models/SeminarycharacterfieldsModel.inc
Package
  Default
Class hierarchy
  \nre\core\Model
  \nre\models\DatabaseModel
  \hhu\z\Model
  \hhu\z\models\SeminarycharacterfieldsModel

## Tags

author | Oliver Hanraths oliver.hanraths@uni-duesseldorf.de

## Properties

### $db

    $db : \nre\models\DatabaseDriver

Database connection

#### Type

\nre\models\DatabaseDriver

#

Inherited from
  \nre\models\DatabaseModel

## Tags

static |

## Methods

### __construct()

    __construct()

Construct a new SeminarycharacterfieldsModel.

TODO Catch exception

#

## Tags

None found

### 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

Inherited from
  \nre\core\Model

## Tags

None found

### factory()

    factory(string  $modelName)

Instantiate a Model (Factory Pattern).

#### Parameters

string | $modelName | Name of the Model to instantiate

#

static

Inherited from
  \nre\core\Model

## Tags

None found

### getFieldsForSeminary()

    getFieldsForSeminary(integer  $seminaryId)

Get all Character fields of a Seminary.

#### Parameters

integer | $seminaryId | ID of Seminary to get fields of

#

## Tags

None found

### setSeminaryFieldOfCharacter()

    setSeminaryFieldOfCharacter(integer  $seminarycharacterfieldId, integer  $characterId, string  $value)

Set the value of a Seminary field for a Character.

#### Parameters

integer | $seminarycharacterfieldId | ID of seminarycharacterfield to set value of
integer | $characterId | ID of Character
string | $value | Value to set

#

## Tags

None found

### getSeminaryFieldOfCharacter()

    getSeminaryFieldOfCharacter(integer  $fieldId, integer  $characterId) : array

Get Seminary Character fields of a Character.

#### Parameters

integer | $fieldId | ID of Seminary Character field
integer | $characterId | ID of the Character

#### Returns

array —

Seminary Character fields

#

## Tags

None found

### getFieldsForCharacter()

    getFieldsForCharacter(integer  $characterId) : array

Get Seminary Character fields of a Character.

#### Parameters

integer | $characterId | ID of the Character

#### Returns

array —

Seminary Character fields

#

## Tags

None found

### loadDriver()

    loadDriver(string  $driverName)

Load the database driver.

#### Parameters

string | $driverName | Name of the database driver

#### Throws

\nre\exceptions\DriverNotFoundException
\nre\exceptions\DriverNotValidException

#

Inherited from
  \nre\models\DatabaseModel

## Tags

None found

### connect()

    connect(string  $driverName, array  $config)

Establish a connection to the database.

#### Parameters

string | $driverName | Name of the database driver
array | $config | Connection settings

#### Throws

\nre\exceptions\DatamodelException

#

Inherited from
  \nre\models\DatabaseModel

## 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

Inherited from
  \nre\core\Model

## 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

#

Inherited from
  \nre\core\Model

## Tags

None found

### SeminarycharacterfieldsModel.inc