public static function getInstance()
 {
     if (is_null(self::$s_instance)) {
         self::$s_instance = new ServiceHostRestriction();
     }
     return self::$s_instance;
 }
 public static function CreateInstance2($restrictionType)
 {
     if ($restrictionType->IsRole()) {
         $restriction = ServiceRoleRestriction::getInstance();
         return $restriction;
     } else {
         if ($restrictionType->IsHost()) {
             $restriction = ServiceHostRestriction::getInstance();
             return $restriction;
         } else {
             if ($restrictionType->IsIPRange()) {
                 $restriction = ServiceIPRangeRestriction::getInstance();
                 return $restriction;
             } else {
                 if ($restrictionType->IsIP()) {
                     $restriction = ServiceIPRestriction::getInstance();
                     return $restriction;
                 }
             }
         }
     }
 }