The Varien_Object is a fundamental class in Magento's object-oriented system that provides basic getters and setters. One of the methods provided by this class is setName(), which allows the name property of an object to be set.
Example 1: Setting the name property of an object
$product = new Varien_Object();
$product->setName("iPhone");
Example 2: Setting the name property of an object using constructor
$product = new Varien_Object(array(
'name' => 'Samsung Galaxy'
));
Package Library: Magento_Core_Model package in the Magento framework.
PHP Varien_Object::setName - 30 examples found. These are the top rated real world PHP examples of Varien_Object::setName extracted from open source projects. You can rate examples to help us improve the quality of examples.