Rev 192 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 192 | Rev 193 | ||
|---|---|---|---|
| Line 54... | Line 54... | ||
| 54 | * using Zend Framework 2.1 Translate
|
54 | * using Zend Framework 2.1 Translate
|
| 55 | *
|
55 | *
|
| 56 | * @param string $s
|
56 | * @param string $s
|
| 57 | * @return string
|
57 | * @return string
|
| 58 | */
|
58 | */
|
| 59 | function _ ($s) |
59 | public function _ ($s) |
| 60 | {
|
60 | {
|
| 61 | return $this->_translator->translate($s, $this->_textDomain, $this->_language); |
61 | return $this->_translator->translate($s, $this->_textDomain, $this->_language); |
| 62 | }
|
62 | }
|
| - | 63 | ||
| - | 64 | public function getCoverage ($seen) |
|
| - | 65 | {
|
|
| - | 66 | if (!is_array($seen)) |
|
| - | 67 | {
|
|
| - | 68 | return ''; |
|
| - | 69 | }
|
|
| - | 70 | ||
| - | 71 | return implode(', ', |
|
| - | 72 | array_map( |
|
| - | 73 | function ($e) { |
|
| - | 74 | if (is_array($e)) |
|
| - | 75 | {
|
|
| - | 76 | if ($e[1] === $e[0] + 1) |
|
| - | 77 | {
|
|
| - | 78 | return implode(', ', $e); |
|
| - | 79 | }
|
|
| - | 80 | ||
| - | 81 | return $e[0] . '–' . $e[1]; |
|
| - | 82 | }
|
|
| - | 83 | ||
| - | 84 | return $e; |
|
| - | 85 | }, |
|
| - | 86 | $seen
|
|
| - | 87 | )
|
|
| - | 88 | ); |
|
| - | 89 | }
|
|
| 63 | }
|
90 | }
|
| 64 | 91 | ||