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

            return $vendor;
        }

        $vi = new VendorInfo();
        $vi->loadMapping($vendor);

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

            return $vendor;
        }

        $vi = new VendorInfo();
        $vi->loadMapping($vendor);

        return $this->addVendorInfo($vi);
    }
public function addVendorInfo ( $ vendor ) { if ( $ vendor instanceof VendorInfo ) { $ this -> vendorInfos [ $ vendor -> getType ( ) ] = $ vendor ; return $ vendor ; } $ vi = new VendorInfo ( ) ; $ vi -> loadMapping ( $ vendor ) ; return $ this -> addVendorInfo ( $ vi ) ; }
Adds a new VendorInfo instance to this current model object.

@param  VendorInfo|array $vendor
@return VendorInfo
Adds a new VendorInfo instance to this current model object .