Metaregistrar\TMCH\tmchClaim::setClaimData PHP Метод

setClaimData() публичный Метод

public setClaimData ( DOMElement $claim )
$claim DOMElement
    public function setClaimData($claim)
    {
        $this->markName = $this->getValue($claim, 'markName');
        $this->jurisdiction = $this->getValue($claim, 'jurDesc');
        $this->goodsAndServices = $this->getValue($claim, 'goodsAndServices');
        $result = $claim->getElementsByTagName('classDesc');
        if (is_object($result) && $result->length > 0) {
            foreach ($result as $class) {
                /* @var \DOMElement $class */
                $classid = $class->getAttribute('classNum');
                $this->classes[$classid] = $class->nodeValue;
            }
        }
        $result = $claim->getElementsByTagName('holder');
        if (is_object($result) && $result->length > 0) {
            $h = $result->item(0);
            /* @var \DOMElement $h */
            $this->holder['entitlement'] = $h->getAttribute('entitlement');
            $this->holder['name'] = $this->getValue($h, 'name');
            $this->holder['organization'] = $this->getValue($h, 'org');
            $this->holder['street'] = $this->getValue($h, 'street');
            $this->holder['city'] = $this->getValue($h, 'city');
            $this->holder['postcode'] = $this->getValue($h, 'pc');
            $this->holder['country'] = $this->getValue($h, 'cc');
        }
        $result = $claim->getElementsByTagName('contact');
        if (is_object($result) && $result->length > 0) {
            $c = $result->item(0);
            /* @var \DOMElement $c */
            $this->contact['type'] = $c->getAttribute('type');
            $this->contact['name'] = $this->getValue($c, 'name');
            $this->contact['organization'] = $this->getValue($c, 'org');
            $this->contact['street'] = $this->getValue($c, 'street');
            $this->contact['city'] = $this->getValue($c, 'city');
            $this->contact['postcode'] = $this->getValue($c, 'pc');
            $this->contact['country'] = $this->getValue($c, 'cc');
            $this->contact['phone'] = $this->getValue($c, 'voice');
            $this->contact['email'] = $this->getValue($c, 'email');
        }
    }