@@ -31,47 +31,47 @@ |
||
| 31 | 31 | )), |
| 32 | 32 | array('strDivision', 'division'), |
| 33 | 33 | array('strManager', 'manager'), |
| 34 | - array('strStadium', 'stadium'), |
|
| 34 | + array('strStadium', 'stadium'), |
|
| 35 | 35 | array('strKeywords', 'keywords'), |
| 36 | - array('strRSS', 'rss'), |
|
| 36 | + array('strRSS', 'rss'), |
|
| 37 | 37 | array('strStadiumThumb', 'stadiumThumb'), |
| 38 | 38 | array('strStadiumDescription', 'stadiumDescription'), |
| 39 | - array('strStadiumLocation', 'stadiumLocation'), |
|
| 40 | - array('intStadiumCapacity', 'stadiumCapacity'), |
|
| 41 | - array('strWebsite', 'website'), |
|
| 39 | + array('strStadiumLocation', 'stadiumLocation'), |
|
| 40 | + array('intStadiumCapacity', 'stadiumCapacity'), |
|
| 41 | + array('strWebsite', 'website'), |
|
| 42 | 42 | array('strFacebook', 'facebook'), |
| 43 | - array('strTwitter', 'twitter'), |
|
| 44 | - array('strInstagram', 'instagram'), |
|
| 45 | - array('strDescriptionEN', 'description'), |
|
| 46 | - array('strGender', 'gender'), |
|
| 43 | + array('strTwitter', 'twitter'), |
|
| 44 | + array('strInstagram', 'instagram'), |
|
| 45 | + array('strDescriptionEN', 'description'), |
|
| 46 | + array('strGender', 'gender'), |
|
| 47 | 47 | array('strCountry', 'country'), |
| 48 | - array('strTeamBadge', 'badge'), |
|
| 48 | + array('strTeamBadge', 'badge'), |
|
| 49 | 49 | array('strTeamJersey', 'jersey'), |
| 50 | - array('strTeamLogo', 'logo'), |
|
| 51 | - array('strTeamBanner', 'banner'), |
|
| 52 | - array('strYoutube', 'youtube'), |
|
| 50 | + array('strTeamLogo', 'logo'), |
|
| 51 | + array('strTeamBanner', 'banner'), |
|
| 52 | + array('strYoutube', 'youtube'), |
|
| 53 | 53 | array('strLocked', 'locked'), |
| 54 | 54 | // idSoccerXML |
| 55 | 55 | // intLoved |
| 56 | 56 | // strLeague |
| 57 | 57 | // strDescriptionDE |
| 58 | - // strDescriptionFR |
|
| 59 | - // strDescriptionCN |
|
| 60 | - // strDescriptionIT |
|
| 61 | - // strDescriptionJP |
|
| 62 | - // strDescriptionRU |
|
| 63 | - // strDescriptionES |
|
| 64 | - // strDescriptionPT |
|
| 65 | - // strDescriptionSE |
|
| 66 | - // strDescriptionNL |
|
| 67 | - // strDescriptionHU |
|
| 68 | - // strDescriptionNO |
|
| 69 | - // strDescriptionIL |
|
| 70 | - // strDescriptionPL |
|
| 58 | + // strDescriptionFR |
|
| 59 | + // strDescriptionCN |
|
| 60 | + // strDescriptionIT |
|
| 61 | + // strDescriptionJP |
|
| 62 | + // strDescriptionRU |
|
| 63 | + // strDescriptionES |
|
| 64 | + // strDescriptionPT |
|
| 65 | + // strDescriptionSE |
|
| 66 | + // strDescriptionNL |
|
| 67 | + // strDescriptionHU |
|
| 68 | + // strDescriptionNO |
|
| 69 | + // strDescriptionIL |
|
| 70 | + // strDescriptionPL |
|
| 71 | 71 | // strTeamFanart1 |
| 72 | - // strTeamFanart2 |
|
| 73 | - // strTeamFanart3 |
|
| 74 | - // strTeamFanart4 |
|
| 72 | + // strTeamFanart2 |
|
| 73 | + // strTeamFanart3 |
|
| 74 | + // strTeamFanart4 |
|
| 75 | 75 | ); |
| 76 | 76 | |
| 77 | 77 | protected $id; |
@@ -47,8 +47,7 @@ |
||
| 47 | 47 | $this->_raw->{$prop} = $val; |
| 48 | 48 | if (method_exists($val, 'raw')) { |
| 49 | 49 | $this->_raw->{$prop} = $val->raw(); |
| 50 | - } |
|
| 51 | - elseif (is_array($val)) { |
|
| 50 | + } elseif (is_array($val)) { |
|
| 52 | 51 | $this->_raw->{$prop} = array(); |
| 53 | 52 | foreach ($val as $v) { |
| 54 | 53 | $this->_raw->{$prop}[] = method_exists($v, 'raw') ? $v->raw() : $v; |
@@ -102,6 +102,9 @@ |
||
| 102 | 102 | return $entity; |
| 103 | 103 | } |
| 104 | 104 | |
| 105 | + /** |
|
| 106 | + * @param string $idName |
|
| 107 | + */ |
|
| 105 | 108 | public static function transformHelper($value, $context, $idName, array $contextPropertyMap = array()) { |
| 106 | 109 | $data = array(); |
| 107 | 110 | $data['id'] = is_object($value) ? $value->{$idName} : $value; |
@@ -18,6 +18,7 @@ discard block |
||
| 18 | 18 | * |
| 19 | 19 | * @param \TheSportsDb\Entity\Factory\FactoryInterface $factory |
| 20 | 20 | * The factory to add. |
| 21 | + * @return void |
|
| 21 | 22 | */ |
| 22 | 23 | public function addFactory(FactoryInterface $factory, $entityType); |
| 23 | 24 | |
@@ -35,5 +36,8 @@ discard block |
||
| 35 | 36 | */ |
| 36 | 37 | public function getFactory($class); |
| 37 | 38 | |
| 39 | + /** |
|
| 40 | + * @return void |
|
| 41 | + */ |
|
| 38 | 42 | public function setDefaultFactory(FactoryInterface $factory); |
| 39 | 43 | } |
@@ -16,5 +16,9 @@ |
||
| 16 | 16 | * @author Jelle Sebreghts |
| 17 | 17 | */ |
| 18 | 18 | interface ProxyInterface extends EntityInterface, EntityManagerConsumerInterface { |
| 19 | + |
|
| 20 | + /** |
|
| 21 | + * @return void |
|
| 22 | + */ |
|
| 19 | 23 | public function setSportsDbClient(TheSportsDbClientInterface $sportsDbClient); |
| 20 | 24 | } |
@@ -7,8 +7,8 @@ |
||
| 7 | 7 | namespace TheSportsDb\Entity\Proxy; |
| 8 | 8 | |
| 9 | 9 | use TheSportsDb\Entity\EntityInterface; |
| 10 | -use TheSportsDb\Http\TheSportsDbClientInterface; |
|
| 11 | 10 | use TheSportsDb\Entity\EntityManagerConsumerInterface; |
| 11 | +use TheSportsDb\Http\TheSportsDbClientInterface; |
|
| 12 | 12 | |
| 13 | 13 | /** |
| 14 | 14 | * Interface for proxy objects. |
@@ -6,8 +6,8 @@ |
||
| 6 | 6 | |
| 7 | 7 | namespace TheSportsDb\Entity\Repository; |
| 8 | 8 | |
| 9 | -use TheSportsDb\Entity\EntityManagerInterface; |
|
| 10 | 9 | use TheSportsDb\Entity\EntityManagerConsumerTrait; |
| 10 | +use TheSportsDb\Entity\EntityManagerInterface; |
|
| 11 | 11 | use TheSportsDb\Http\TheSportsDbClientInterface; |
| 12 | 12 | |
| 13 | 13 | /** |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | */ |
| 49 | 49 | public function byId($id) { |
| 50 | 50 | if (!isset($this->repository[$id])) { |
| 51 | - $factory = $this->entityManager->factory($this->getEntityTypeName()); |
|
| 51 | + $factory = $this->entityManager->factory($this->getEntityTypeName()); |
|
| 52 | 52 | $this->repository[$id] = $factory->create( |
| 53 | 53 | (object) array('id' => $id), |
| 54 | 54 | $this->getEntityTypeName(), |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | $entity->update($mapped); |
| 80 | 80 | return $entity; |
| 81 | 81 | } |
| 82 | - $factory = $this->entityManager->factory($this->getEntityTypeName()); |
|
| 82 | + $factory = $this->entityManager->factory($this->getEntityTypeName()); |
|
| 83 | 83 | $this->repository[$mapped->id] = $factory->create($mapped, $this->getEntityTypeName(), FALSE); |
| 84 | 84 | return $this->repository[$mapped->id]; |
| 85 | 85 | } |
@@ -16,8 +16,9 @@ |
||
| 16 | 16 | /** |
| 17 | 17 | * Add a repository for a class. |
| 18 | 18 | * |
| 19 | - * @param \TheSportsDb\Repository\RepositoryInterface $repository |
|
| 19 | + * @param RepositoryInterface $repository |
|
| 20 | 20 | * The repository to add. |
| 21 | + * @return void |
|
| 21 | 22 | */ |
| 22 | 23 | public function addRepository(RepositoryInterface $repository); |
| 23 | 24 | |
@@ -25,6 +25,7 @@ |
||
| 25 | 25 | * |
| 26 | 26 | * @param \TheSportsDb\Entity\LeagueInterface $league |
| 27 | 27 | * The league to add. |
| 28 | + * @return void |
|
| 28 | 29 | */ |
| 29 | 30 | public function addLeague(LeagueInterface $league); |
| 30 | 31 | } |
@@ -15,6 +15,7 @@ |
||
| 15 | 15 | |
| 16 | 16 | /** |
| 17 | 17 | * {@inheritdoc} |
| 18 | + * @return \stdClass |
|
| 18 | 19 | */ |
| 19 | 20 | public function doRequest($endpoint, array $parameters = array()); |
| 20 | 21 | } |
@@ -16,5 +16,9 @@ |
||
| 16 | 16 | * @author Jelle Sebreghts |
| 17 | 17 | */ |
| 18 | 18 | interface ProxyInterface extends EntityInterface, EntityManagerConsumerInterface { |
| 19 | + |
|
| 20 | + /** |
|
| 21 | + * @return void |
|
| 22 | + */ |
|
| 19 | 23 | public function setSportsDbClient(TheSportsDbClientInterface $sportsDbClient); |
| 20 | 24 | } |