| @@ 73-86 (lines=14) @@ | ||
| 70 | return $this->event; |
|
| 71 | } |
|
| 72 | ||
| 73 | public function getGameUserPath($game, $user) |
|
| 74 | { |
|
| 75 | $path = $this->getOptions()->getMediaPath() . DIRECTORY_SEPARATOR; |
|
| 76 | $path .= 'game' . $game->getId() . DIRECTORY_SEPARATOR; |
|
| 77 | if (!is_dir($path)) { |
|
| 78 | mkdir($path, 0777, true); |
|
| 79 | } |
|
| 80 | $path .= 'user'. $user->getId() . DIRECTORY_SEPARATOR; |
|
| 81 | if (!is_dir($path)) { |
|
| 82 | mkdir($path, 0777, true); |
|
| 83 | } |
|
| 84 | ||
| 85 | return $path; |
|
| 86 | } |
|
| 87 | ||
| 88 | public function getGameUserMediaUrl($game, $user) |
|
| 89 | { |
|
| @@ 13-26 (lines=14) @@ | ||
| 10 | protected $memoryCardMapper; |
|
| 11 | protected $memoryScoreMapper; |
|
| 12 | ||
| 13 | public function getCardPath($card) |
|
| 14 | { |
|
| 15 | $path = $this->getOptions()->getMediaPath().DIRECTORY_SEPARATOR; |
|
| 16 | $path .= 'game'.$card->getGame()->getId().DIRECTORY_SEPARATOR; |
|
| 17 | if (!is_dir($path)) { |
|
| 18 | mkdir($path, 0777, true); |
|
| 19 | } |
|
| 20 | $path .= 'cards'.DIRECTORY_SEPARATOR; |
|
| 21 | if (!is_dir($path)) { |
|
| 22 | mkdir($path, 0777, true); |
|
| 23 | } |
|
| 24 | ||
| 25 | return $path; |
|
| 26 | } |
|
| 27 | ||
| 28 | public function getCardMediaUrl($card) |
|
| 29 | { |
|
| @@ 13-26 (lines=14) @@ | ||
| 10 | protected $tradingcardmodelMapper; |
|
| 11 | protected $tradingcardcardMapper; |
|
| 12 | ||
| 13 | public function getModelPath($model) |
|
| 14 | { |
|
| 15 | $path = $this->getOptions()->getMediaPath().DIRECTORY_SEPARATOR; |
|
| 16 | $path .= 'game'.$model->getGame()->getId().DIRECTORY_SEPARATOR; |
|
| 17 | if (!is_dir($path)) { |
|
| 18 | mkdir($path, 0777, true); |
|
| 19 | } |
|
| 20 | $path .= 'models'.DIRECTORY_SEPARATOR; |
|
| 21 | if (!is_dir($path)) { |
|
| 22 | mkdir($path, 0777, true); |
|
| 23 | } |
|
| 24 | ||
| 25 | return $path; |
|
| 26 | } |
|
| 27 | ||
| 28 | public function getModelMediaUrl($model) |
|
| 29 | { |
|
| @@ 23-36 (lines=14) @@ | ||
| 20 | return new \PlaygroundGame\Entity\PostVote; |
|
| 21 | } |
|
| 22 | ||
| 23 | public function getPath($post) |
|
| 24 | { |
|
| 25 | $path = $this->getOptions()->getMediaPath() . DIRECTORY_SEPARATOR; |
|
| 26 | $path .= 'game' . $post->getPostVote()->getId() . DIRECTORY_SEPARATOR; |
|
| 27 | if (!is_dir($path)) { |
|
| 28 | mkdir($path, 0777, true); |
|
| 29 | } |
|
| 30 | $path .= 'post'. $post->getId() . DIRECTORY_SEPARATOR; |
|
| 31 | if (!is_dir($path)) { |
|
| 32 | mkdir($path, 0777, true); |
|
| 33 | } |
|
| 34 | ||
| 35 | return $path; |
|
| 36 | } |
|
| 37 | ||
| 38 | public function getMediaUrl($post) |
|
| 39 | { |
|