public function getPostalInfo($type)
    {
        if (!in_array($type, [PostalInfo::TYPE_INT, PostalInfo::TYPE_LOC])) {
            throw new UnexpectedValueException(sprintf(
                'The value of the parameter \'type\' must be set to \'%s\' or \'%s\'.',
                PostalInfo::TYPE_INT,
                PostalInfo::TYPE_LOC
            ));
        }

        $query = sprintf('//epp:epp/epp:response/epp:resData/contact:infData/contact:postalInfo[@type=\'%s\']', $type);
        $node = $this->getFirst($query);
        if ($node === null) {
            return null;
        }

        return new PostalInfoHelper($this, $node);
    }
public function getPostalInfo($type)
    {
        if (!in_array($type, [PostalInfo::TYPE_INT, PostalInfo::TYPE_LOC])) {
            throw new UnexpectedValueException(sprintf(
                'The value of the parameter \'type\' must be set to \'%s\' or \'%s\'.',
                PostalInfo::TYPE_INT,
                PostalInfo::TYPE_LOC
            ));
        }

        $query = sprintf('//epp:epp/epp:response/epp:resData/contact:infData/contact:postalInfo[@type=\'%s\']', $type);
        $node = $this->getFirst($query);
        if ($node === null) {
            return null;
        }

        return new PostalInfoHelper($this, $node);
    }
public function getPostalInfo ( $ type ) { if ( ! in_array ( $ type , [ PostalInfo :: TYPE_INT , PostalInfo :: TYPE_LOC ] ) ) { throw new UnexpectedValueException ( sprintf ( 'The value of the parameter \'type\' must be set to \'%s\' or \'%s\'.' , PostalInfo :: TYPE_INT , PostalInfo :: TYPE_LOC ) ) ; } $ query = sprintf ( '//epp:epp/epp:response/epp:resData/contact:infData/contact:postalInfo[@type=\'%s\']' , $ type ) ; $ node = $ this -> getFirst ( $ query ) ; if ( $ node === null ) { return null ; } return new PostalInfoHelper ( $ this , $ node ) ; }
Getting the postal-address information by type.

@param string $type type of the <contact:postalInfo> node

@return PostalInfoHelper|null
Getting the postal - address information by type .