# ConsultationFactory

Implements \NPS\Factory\IObjectFactory

Consultation object factory

author | Lukas Korinek
package | Default

### Methods

## __construct

    __construct(\Doctrine\ORM\EntityManagerInterface $em, \NPS\DependencyInjection\IExpertSystemBridge $es, \NPS\DependencyInjection\IXMLContentParser $parser, \NPS\Factory\UserFactory $userFactory, \NPS\Factory\KnowledgeBaseFactory $knowledgeBaseFactory)

### Arguments

#### $em

`\Doctrine\ORM\EntityManagerInterface`

#### $es

`\NPS\DependencyInjection\IExpertSystemBridge`

#### $parser

`\NPS\DependencyInjection\IXMLContentParser`

#### $userFactory

`\NPS\Factory\UserFactory`

#### $knowledgeBaseFactory

`\NPS\Factory\KnowledgeBaseFactory`

## Creates a new consultation and activates it

    create(\NPS\Model\KnowledgeBase $base, \NPS\Model\User $user = null) : \NPS\Model\Consultation|null

### Arguments

#### $base

`\NPS\Model\KnowledgeBase`

#### $user

`\NPS\Model\User`

### Response

`\NPS\Model\Consultation|null`

## Loads a factored object from the memory

    load(mixed $entity, \Closure $callback) : mixed

inherited

### Arguments

#### $entity

`mixed`

Entity for which to load the object

#### $callback

`\Closure`

### Response

`mixed`

## Creates an object out of its doctrine entity

    make(\NPS\Entity\IEntity $entity) : \NPS\Model\IDomainObject

inheritDoc |

### Arguments

#### $entity

`\NPS\Entity\IEntity`

Entity object

### Response

`\NPS\Model\IDomainObject`

### Properties

## es

    es : \NPS\DependencyInjection\IExpertSystemBridge

var |

### Type(s)

`\NPS\DependencyInjection\IExpertSystemBridge`

## knowledgeBaseFactory

    knowledgeBaseFactory : \NPS\Factory\KnowledgeBaseFactory

var |

### Type(s)

`\NPS\Factory\KnowledgeBaseFactory`

## userFactory

    userFactory : \NPS\Factory\UserFactory

var |

### Type(s)

`\NPS\Factory\UserFactory`

## parser

    parser : \NPS\DependencyInjection\IXMLContentParser

var |

### Type(s)

`\NPS\DependencyInjection\IXMLContentParser`

## em

    em : \Doctrine\ORM\EntityManagerInterface

var |

### Type(s)

`\Doctrine\ORM\EntityManagerInterface`

## memory

    memory : array

inherited

var |

### Type(s)

`array`