svn: /pear2/BugManager/trunk/src/BugManager/Site/SimpleChannelServer/ ActorManager.php
| From: | Brett Bieber | Date: | Fri, 05 Mar 2010 16:45:51 +0000 |
| Subject: | svn: /pear2/BugManager/trunk/src/BugManager/Site/SimpleChannelServer/ ActorManager.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-9271@lists.php.net to get a copy of this message | ||
saltybeagle Fri, 05 Mar 2010 16:45:51 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=295856
Log:
Get SimpleChannelServer Actors working by looking at the list of maintainers for the channel.
Changed paths:
U pear2/BugManager/trunk/src/BugManager/Site/SimpleChannelServer/ActorManager.php
Modified: pear2/BugManager/trunk/src/BugManager/Site/SimpleChannelServer/ActorManager.php
===================================================================
--- pear2/BugManager/trunk/src/BugManager/Site/SimpleChannelServer/ActorManager.php 2010-03-05
16:44:19 UTC (rev 295855)
+++ pear2/BugManager/trunk/src/BugManager/Site/SimpleChannelServer/ActorManager.php 2010-03-05
16:45:51 UTC (rev 295856)
@@ -30,11 +30,13 @@
class ActorManager implements ActorManagerInterface
{
static protected $loggedinUser;
- protected $channel;
+ protected $fakeinternet;
function __construct(\pear2\Pyrus\ChannelFile $channel)
{
- $this->channel = $channel;
+ $this->channel = $channel;
+ $this->fakeinternet = new \pear2\BugManager\Site\SimpleChannelServer\FakeInternet;
+ $this->fakeinternet->setupChannel($channel);
}
/**
@@ -42,7 +44,14 @@
*/
function retrieve($uniqueid)
{
- throw new BugManager\BadMethodCallException('not implemented');
+ if (!isset($this->channel->remotemaintainers[$uniqueid])) {
+ throw new Exception('Unknown user ' . $uniqueid);
+ }
+ $actor = new Actor;
+ $actor->name = $this->channel->remotemaintainers[$uniqueid]['n'];
+ $actor->handle = $this->channel->remotemaintainers[$uniqueid]['h'];
+ $actor->karma = Actor::DEV;
+ return $actor;
}
protected function processActor($info)