コード例 #1
0
ファイル: TagManager.php プロジェクト: versionable/mandrill
 public function allTimeSeries()
 {
     $response = $this->doSend('all-time-series');
     $all = new Map();
     foreach ($response as $data) {
         $timeSeries = $this->createTimeSeries($data);
         $elements = $all->get($data->tag);
         if (null === $elements) {
             $elements = new Set();
         }
         $elements->add($timeSeries);
         $all->put($data->tag, $elements);
     }
     return $all;
 }
コード例 #2
0
ファイル: MapTest.php プロジェクト: versionable/common
 /**
  * @todo Implement testValues().
  */
 public function testValues()
 {
     $this->object->put('one', new \stdClass());
     $this->object->put('two', new \stdClass());
     $this->assertEquals(array_values($this->readAttribute($this->object, 'elements')), $this->object->values());
 }