# KnowledgeBase

Implements \NPS\Model\IDomainObject

Knowledge base model object

author | Lukas Korinek
package | Default

### Methods

## __construct

    __construct(\NPS\Entity\KnowledgeBaseEntity $entity, \NPS\DependencyInjection\IKnowledgeBaseInfoProvider $infoProvider)

### Arguments

#### $entity

`\NPS\Entity\KnowledgeBaseEntity`

#### $infoProvider

`\NPS\DependencyInjection\IKnowledgeBaseInfoProvider`

## Gets a correct discrimininator tag for multimedia matching during question and hypothesis parsing Warning: Must be in sync with media file creation in order to match correctly

    getBaseDiscriminatorTag() : string

### Response

`string`

## Gets content checksum

    getChecksum() : integer

### Response

`integer`

## Gets the file content

    getContent() : string

### Response

`string`

## Gets knowledge base description

    getDescription() : string

### Response

`string`

## Gets the entity of the object

    getEntity() : \NPS\Entity\IEntity

inheritDoc |

### Response

`\NPS\Entity\IEntity`

## Gets the id of the object

    getId() : integer

inheritDoc |

### Response

`integer`

## getKnowledgeBaseBindId

    getKnowledgeBaseBindId()

inheritDoc |

## Gets name of the knowledge base

    getName() : string

### Response

`string`

## Gets path of the knowledge base file

    getPath() : string

### Response

`string`

## Gets status of the knowledge base

    getStatus() : integer|string

### Response

`integer|string`

## Gets a list of languages supported by this knowledge base

    getSupportedLanguages() : array

### Response

`array`

## Gets version date of the knowledge base

    getVersion() : \DateTime

### Response

`\DateTime`

## Invalidates DB cached stuff

    invalidateDbCache()

## logMessages

    logMessages()

inherited

inheritDoc |

## popMessage

    popMessage()

inherited

inheritDoc |

## Pushes a message

    pushMessage(string $message)

inherited

### Arguments

#### $message

`string`

## Set status of this base

    setStatus(integer $status)

### Arguments

#### $status

`integer`

## Updates the file of a knowledge base with the content

    updateContent(string $content) : boolean

### Arguments

#### $content

`string`

### Response

`boolean`

True on success

### Constants

## STATUS_DEV

    STATUS_DEV

## STATUS_TESTING

    STATUS_TESTING

## STATUS_PUBLIC

    STATUS_PUBLIC

## STATUS_DEMO

    STATUS_DEMO

## STATUS_DISABLED

    STATUS_DISABLED

### Properties

## entity

    entity : \NPS\Entity\KnowledgeBaseEntity

var |

### Type(s)

`\NPS\Entity\KnowledgeBaseEntity`

## infoProvider

    infoProvider : \NPS\DependencyInjection\IKnowledgeBaseInfoProvider

var |

### Type(s)

`\NPS\DependencyInjection\IKnowledgeBaseInfoProvider`

## File content of the knowledge base

    content : string

var | File content of the knowledge base

### Type(s)

`string`

## messages

    messages : array

inherited

var |

### Type(s)

`array`

## messagePointer

    messagePointer : integer

inherited

var |

### Type(s)

`integer`