| @@ 48-62 (lines=15) @@ | ||
| 45 | * @param EventsManager $events |
|
| 46 | * @param EntityManager $em |
|
| 47 | */ |
|
| 48 | public function __construct( |
|
| 49 | Configuration $configuration, |
|
| 50 | LoggerInterface $logger, |
|
| 51 | EventsManager $events, |
|
| 52 | EntityManager $em = null |
|
| 53 | ) { |
|
| 54 | ||
| 55 | $this->setConfiguration($configuration); |
|
| 56 | $this->setLogger($logger); |
|
| 57 | $this->setEvents($events); |
|
| 58 | ||
| 59 | $em = is_null($em) ? Database::init($configuration)->getEntityManager() : $em; |
|
| 60 | $this->setEntityManager($em); |
|
| 61 | ||
| 62 | } |
|
| 63 | ||
| 64 | public function get($id) { |
|
| 65 | ||
| @@ 49-70 (lines=22) @@ | ||
| 46 | * @param EventsManager $events |
|
| 47 | * @param EntityManager $em |
|
| 48 | */ |
|
| 49 | public function __construct( |
|
| 50 | Configuration $configuration, |
|
| 51 | LoggerInterface $logger, |
|
| 52 | EventsManager $events, |
|
| 53 | EntityManager $em = null |
|
| 54 | ) { |
|
| 55 | ||
| 56 | $this->setConfiguration($configuration); |
|
| 57 | $this->setLogger($logger); |
|
| 58 | $this->setEvents($events); |
|
| 59 | ||
| 60 | $em = is_null($em) ? Database::init($configuration)->getEntityManager() : $em; |
|
| 61 | $this->setEntityManager($em); |
|
| 62 | ||
| 63 | // $logger->debug("Tasks Manager online", array( |
|
| 64 | // 'lagger_timeout' => $this->lagger_timeout, |
|
| 65 | // 'multithread' => $this->multithread, |
|
| 66 | // 'max_runtime' => $this->max_runtime, |
|
| 67 | // 'max_childs' => $this->max_childs |
|
| 68 | // )); |
|
| 69 | ||
| 70 | } |
|
| 71 | ||
| 72 | public function get() { |
|
| 73 | ||