| @@ 32-44 (lines=13) @@ | ||
| 29 | ||
| 30 | } |
|
| 31 | ||
| 32 | public function getSpaceId($space) |
|
| 33 | { |
|
| 34 | if (!array_key_exists($space, $this->spaceId)) { |
|
| 35 | $response = $this->spaceSpace->select([$space], Index::SPACE_NAME); |
|
| 36 | $data = $response->getData(); |
|
| 37 | if (!empty($data)) { |
|
| 38 | $this->spaceId[$space] = $data[0][0]; |
|
| 39 | } |
|
| 40 | } |
|
| 41 | if (array_key_exists($space, $this->spaceId)) { |
|
| 42 | return $this->spaceId[$space]; |
|
| 43 | } |
|
| 44 | } |
|
| 45 | ||
| 46 | public function getSpaceName($spaceId) |
|
| 47 | { |
|
| @@ 46-59 (lines=14) @@ | ||
| 43 | } |
|
| 44 | } |
|
| 45 | ||
| 46 | public function getSpaceName($spaceId) |
|
| 47 | { |
|
| 48 | if (!in_array($spaceId, $this->spaceId)) { |
|
| 49 | $response = $this->spaceSpace->select([$spaceId], 0); |
|
| 50 | $data = $response->getData(); |
|
| 51 | if (!empty($data)) { |
|
| 52 | $this->spaceId[$data[0][2]] = $spaceId; |
|
| 53 | } |
|
| 54 | } |
|
| 55 | ||
| 56 | if (in_array($spaceId, $this->spaceId)) { |
|
| 57 | return array_search($spaceId, $this->spaceId); |
|
| 58 | } |
|
| 59 | } |
|
| 60 | ||
| 61 | public function hasSpace($space) |
|
| 62 | { |
|