public static function &getClient($clientId = NULL)
 {
     if (count(self::$items) == 0 && isset($_SESSION["queryId"])) {
         self::$items = unserialize($_SESSION["queryId"]);
     }
     if (is_null($clientId)) {
         if (!isset($_GET["clientid"])) {
             return NULL;
         } else {
             $CurrentClientId = $_GET["clientid"];
             return self::getClient($CurrentClientId);
         }
     }
     if (!array_key_exists($clientId, self::$items)) {
         /*DataServiceClient*/
         $dataServiceClient = new DataServiceClient();
         self::$items[$clientId] = $dataServiceClient;
         $_SESSION["queryId"] = serialize(self::$items);
     }
     return self::$items[$clientId];
 }
Ejemplo n.º 2
0
 private function getIdentityMap()
 {
     if (is_null($this->identityMap)) {
         $this->identityMap = DataServiceClientRegistry::getIdentityMap();
     }
     return $this->identityMap;
 }