Exemplo n.º 1
0
    function initValuesFromArray($arr){
	parent::initValuesFromArray($arr);
	//removing empty elements
	$types = array();
	foreach ($arr[$this->pn("types")] as $type){
	    if (strlen($type))
		$types[] = $type;
	}
	$this->values["types"] = implode(" ",$types);
    }
Exemplo n.º 2
0
    function initValuesFromArray($arr){
	parent::initValuesFromArray($arr);
	//removing empty elements
	$services = array();
        foreach ($arr[$this->pn("services")] as $service){
    	    if (strlen($service))
	        $services[] = $service;
	}
	$this->values["services"] = implode("+",$services);
    }
Exemplo n.º 3
0
 function initValuesFromArray($arr)
 {
     parent::initValuesFromArray($arr);
     $isAnyService = isset($arr[$this->pn("isAnyService")]) ? True : False;
     $service = $isAnyService ? "*" : $arr[$this->pn("service")];
     $hasTarget = isset($arr[$this->pn("hasTarget")]) ? True : False;
     if (!$hasTarget) {
         $this->values["target"] = ".";
     }
     $protos = $this->protocols();
     $proto = strtolower($protos[$arr[$this->pn("proto")]]);
     if ($proto === _T("custom")) {
         $proto = $arr[$this->pn("customProto")];
         echo "proto defined";
     }
     $prefix = $service == "*" ? "" : "_";
     $this->hostname = $prefix . $service . "._" . $proto;
 }