title: Programmatically add Bundle Products in Magento, using the SKU / ID of Simple Items
body: <p>I have some simple catalog products in Magento, so I have their SKUs &amp; IDs. Now I want to create a Bundled product using the array elements "bundle_options" &amp; "bundle_selections" of the Bundle Items, which are used by the Magento Admin coding in its Observer Class.   </p>
  
  <p>Also in the Observer class, there are method calls of two functions "<code>setBundleOptionsData()</code>" &amp; "<code>setBundleSelectionsData()</code>", for whose I am not able to find any function definition.  </p>
  
  <p>Please any professional post here, because I need some proper way of doing this thing. If it needs, overriding modules or using events, I will do, but I need really professional help.
  Thanks in advance.  </p>
  
  <p><strong>Edit:-</strong><br>
  Regarding the two methods mentioned above "<code>setBundleOptionsData()</code>" &amp; "<code>setBundleSelectionsData()</code>", what I'm almost certain is that they are using some sort of PHP magic methods, but I don't know where the main logic of these magic methods are written?  </p>
  
  <p>Please anybody provide some correct answer. Any help is greatly appreciated.</p>