$product = new Varien_Object(); $product->setData('name', 'Widget'); $product->setLabel('Product ID 123');
$record = new Varien_Object(); $record->setId(123); $record->setData('customer_id', 456); $record->setLabel('Order #789');
$myObject = new Varien_Object(); $myObject->setData('some_data', 'foo'); $myObject->setLabel('My Custom Object');In this example, we create a new custom object for some purpose. We set some data for the object and also set a label for it that identifies it as "My Custom Object". This label could be used to track this object throughout an application or development process. Package Library: Magento