-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fix] issue #45 - make the group_urlname configurable
- abstracted the AbstractService::__constructor() - abstracted common methods: AbstractService::getApi(), AbstractService::getCache()
- Loading branch information
madmanmax
committed
Nov 22, 2014
1 parent
924b191
commit cc74a7f
Showing
6 changed files
with
67 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,3 +16,4 @@ parameters: | |
|
||
meetup_key: | ||
akismet_key: | ||
group_urlname: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
src/AmsterdamPHP/Bundle/MeetupBundle/Service/AbstractService.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?php | ||
|
||
namespace AmsterdamPHP\Bundle\MeetupBundle\Service; | ||
|
||
use DMS\Service\Meetup\AbstractMeetupClient; | ||
use Predis\Client; | ||
|
||
class AbstractService { | ||
/** | ||
* @var \DMS\Service\Meetup\AbstractMeetupClient | ||
*/ | ||
protected $api; | ||
|
||
/** | ||
* @var Client | ||
*/ | ||
protected $cache; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
protected $group; | ||
|
||
/** | ||
* @param AbstractMeetupClient $api | ||
* @param \Predis\Client $cache | ||
* @param string $group path to group on meetup.com | ||
*/ | ||
public function __construct(AbstractMeetupClient $api, Client $cache, $group) | ||
{ | ||
$this->api = $api; | ||
$this->cache = $cache; | ||
$this->group = $group; | ||
} | ||
|
||
/** | ||
* @return \DMS\Service\Meetup\AbstractMeetupClient | ||
*/ | ||
public function getApi() | ||
{ | ||
return $this->api; | ||
} | ||
|
||
/** | ||
* @return \Predis\Client | ||
*/ | ||
public function getCache() | ||
{ | ||
return $this->cache; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters