| @@ 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 | { |
|
| @@ 80-93 (lines=14) @@ | ||
| 77 | return $this->event; |
|
| 78 | } |
|
| 79 | ||
| 80 | public function getGameUserPath($game, $user) |
|
| 81 | { |
|
| 82 | $path = $this->getOptions()->getMediaPath() . DIRECTORY_SEPARATOR; |
|
| 83 | $path .= 'game' . $game->getId() . DIRECTORY_SEPARATOR; |
|
| 84 | if (!is_dir($path)) { |
|
| 85 | mkdir($path, 0777, true); |
|
| 86 | } |
|
| 87 | $path .= 'user'. $user->getId() . DIRECTORY_SEPARATOR; |
|
| 88 | if (!is_dir($path)) { |
|
| 89 | mkdir($path, 0777, true); |
|
| 90 | } |
|
| 91 | ||
| 92 | return $path; |
|
| 93 | } |
|
| 94 | ||
| 95 | public function getGameUserMediaUrl($game, $user) |
|
| 96 | { |
|
| @@ 30-43 (lines=14) @@ | ||
| 27 | return new \PlaygroundGame\Entity\PostVote; |
|
| 28 | } |
|
| 29 | ||
| 30 | public function getPath($post) |
|
| 31 | { |
|
| 32 | $path = $this->getOptions()->getMediaPath() . DIRECTORY_SEPARATOR; |
|
| 33 | $path .= 'game' . $post->getPostVote()->getId() . DIRECTORY_SEPARATOR; |
|
| 34 | if (!is_dir($path)) { |
|
| 35 | mkdir($path, 0777, true); |
|
| 36 | } |
|
| 37 | $path .= 'post'. $post->getId() . DIRECTORY_SEPARATOR; |
|
| 38 | if (!is_dir($path)) { |
|
| 39 | mkdir($path, 0777, true); |
|
| 40 | } |
|
| 41 | ||
| 42 | return $path; |
|
| 43 | } |
|
| 44 | ||
| 45 | public function getMediaUrl($post) |
|
| 46 | { |
|