private function _mapById($tree)
 {
     $req = new DownlineMapByIdRequest();
     $req->setDataToMap($tree);
     $req->setAsId(Compress::ATTR_CUSTOMER_ID);
     $resp = $this->_callDownlineMap->byId($req);
     return $resp->getMapped();
 }
Exemplo n.º 2
0
 public function byId(Map\Request\ById $req)
 {
     $result = new Response\ById();
     /* extract parameters from request */
     $asId = $req->getAsId();
     $toMap = $req->getDataToMap();
     $mapped = [];
     foreach ($toMap as $item) {
         $mapped[$item[$asId]] = $item;
     }
     $result->setMapped($mapped);
     $result->markSucceed();
     return $result;
 }