@@ -147,6 +147,9 @@ |
||
| 147 | 147 | $this->context = $context; |
| 148 | 148 | } |
| 149 | 149 | |
| 150 | + /** |
|
| 151 | + * @param string $path |
|
| 152 | + */ |
|
| 150 | 153 | public function getEnvironmentVariableOverride($path) |
| 151 | 154 | { |
| 152 | 155 | $pathTranslated = 'MCM_' . str_replace('/', '_', strtoupper($path)); |
@@ -60,14 +60,14 @@ discard block |
||
| 60 | 60 | public function getMongoDsnString() |
| 61 | 61 | { |
| 62 | 62 | $config = $this->getDatabaseConfiguration(); |
| 63 | - $dsn = 'mongodb://'; //[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database][?options]]'; |
|
| 63 | + $dsn = 'mongodb://'; //[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database][?options]]'; |
|
| 64 | 64 | $at = false; |
| 65 | 65 | if (!empty($config['username'])) { |
| 66 | 66 | $dsn .= $config['username']; |
| 67 | 67 | $at = true; |
| 68 | 68 | } |
| 69 | 69 | if (!empty($config['password'])) { |
| 70 | - $dsn .= ':'.$config['password']; |
|
| 70 | + $dsn .= ':' . $config['password']; |
|
| 71 | 71 | $at = true; |
| 72 | 72 | } |
| 73 | 73 | if ($at) { |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | $config = $this->getDatabaseConfiguration(); |
| 89 | 89 | $dsn = $this->getMongoDsnString(); |
| 90 | 90 | $client = new Client($dsn); |
| 91 | - $collection = empty($config['table'])?Mongo::TABLE:$config['table']; |
|
| 91 | + $collection = empty($config['table']) ?Mongo::TABLE : $config['table']; |
|
| 92 | 92 | return new Mongo($client->selectCollection($config['database'], $collection)); |
| 93 | 93 | } |
| 94 | 94 | |
@@ -34,6 +34,10 @@ |
||
| 34 | 34 | } |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | + /** |
|
| 38 | + * @param string $id |
|
| 39 | + * @param string $name |
|
| 40 | + */ |
|
| 37 | 41 | protected function formatNode($id, $name = null) |
| 38 | 42 | { |
| 39 | 43 | if ($name == null) { |