public function addVendorInfo($data)
    {
        if ($data instanceof VendorInfo) {
            $vi = $data;
            $this->vendorInfos[$vi->getType()] = $vi;

            return $vi;
        } else {
            $vi = new VendorInfo();
            $vi->loadFromXML($data);

            return $this->addVendorInfo($vi); // call self w/ different param
        }
    }
public function addVendorInfo($data)
    {
        if ($data instanceof VendorInfo) {
            $vi = $data;
            $this->vendorInfos[$vi->getType()] = $vi;

            return $vi;
        } else {
            $vi = new VendorInfo();
            $vi->loadFromXML($data);

            return $this->addVendorInfo($vi); // call self w/ different param
        }
    }
public function addVendorInfo ( $ data ) { if ( $ data instanceof VendorInfo ) { $ vi = $ data ; $ this -> vendorInfos [ $ vi -> getType ( ) ] = $ vi ; return $ vi ; } else { $ vi = new VendorInfo ( ) ; $ vi -> loadFromXML ( $ data ) ; return $ this -> addVendorInfo ( $ vi ) ; // call self w/ different param } }
Sets an associated VendorInfo object.

@param mixed $data VendorInfo object or XML attrib data (array)

@return VendorInfo
Sets an associated VendorInfo object .