| @@ 54-67 (lines=14) @@ | ||
| 51 | ||
| 52 | protected $anonymousIdentifier = null; |
|
| 53 | ||
| 54 | public function getGameUserPath($game, $user) |
|
| 55 | { |
|
| 56 | $path = $this->getOptions()->getMediaPath() . DIRECTORY_SEPARATOR; |
|
| 57 | $path .= 'game' . $game->getId() . DIRECTORY_SEPARATOR; |
|
| 58 | if (!is_dir($path)) { |
|
| 59 | mkdir($path, 0777, true); |
|
| 60 | } |
|
| 61 | $path .= 'user'. $user->getId() . DIRECTORY_SEPARATOR; |
|
| 62 | if (!is_dir($path)) { |
|
| 63 | mkdir($path, 0777, true); |
|
| 64 | } |
|
| 65 | ||
| 66 | return $path; |
|
| 67 | } |
|
| 68 | ||
| 69 | public function getGameUserMediaUrl($game, $user) |
|
| 70 | { |
|
| @@ 22-35 (lines=14) @@ | ||
| 19 | return new \PlaygroundGame\Entity\PostVote; |
|
| 20 | } |
|
| 21 | ||
| 22 | public function getPath($post) |
|
| 23 | { |
|
| 24 | $path = $this->getOptions()->getMediaPath() . DIRECTORY_SEPARATOR; |
|
| 25 | $path .= 'game' . $post->getPostVote()->getId() . DIRECTORY_SEPARATOR; |
|
| 26 | if (!is_dir($path)) { |
|
| 27 | mkdir($path, 0777, true); |
|
| 28 | } |
|
| 29 | $path .= 'post'. $post->getId() . DIRECTORY_SEPARATOR; |
|
| 30 | if (!is_dir($path)) { |
|
| 31 | mkdir($path, 0777, true); |
|
| 32 | } |
|
| 33 | ||
| 34 | return $path; |
|
| 35 | } |
|
| 36 | ||
| 37 | public function getMediaUrl($post) |
|
| 38 | { |
|
| @@ 15-28 (lines=14) @@ | ||
| 12 | protected $tradingcardmodelMapper; |
|
| 13 | protected $tradingcardcardMapper; |
|
| 14 | ||
| 15 | public function getModelPath($model) |
|
| 16 | { |
|
| 17 | $path = $this->getOptions()->getMediaPath() . DIRECTORY_SEPARATOR; |
|
| 18 | $path .= 'game' . $model->getGame()->getId() . DIRECTORY_SEPARATOR; |
|
| 19 | if (!is_dir($path)) { |
|
| 20 | mkdir($path, 0777, true); |
|
| 21 | } |
|
| 22 | $path .= 'model'. $model->getId() . DIRECTORY_SEPARATOR; |
|
| 23 | if (!is_dir($path)) { |
|
| 24 | mkdir($path, 0777, true); |
|
| 25 | } |
|
| 26 | ||
| 27 | return $path; |
|
| 28 | } |
|
| 29 | ||
| 30 | public function getModelMediaUrl($model) |
|
| 31 | { |
|