Public Member Functions | |
setDefaultClass ($className) | |
addItem ($name, Varien_Convert_Container_Interface $item) | |
getItem ($name) | |
hasItem ($name) | |
Protected Attributes | |
$_items = array() | |
$_defaultClass = 'Varien_Convert_Container_Generic' |
Definition at line 35 of file Collection.php.
addItem | ( | $ | name, | |
Varien_Convert_Container_Interface $ | item | |||
) |
Definition at line 46 of file Collection.php.
00047 { 00048 if (is_null($name)) { 00049 if ($item->getName()) { 00050 $name = $item->getName(); 00051 } else { 00052 $name = sizeof($this->_items); 00053 } 00054 } 00055 00056 $this->_items[$name] = $item; 00057 00058 return $item; 00059 }
getItem | ( | $ | name | ) |
Definition at line 61 of file Collection.php.
00062 { 00063 if (!isset($this->_items[$name])) { 00064 $this->addItem($name, new $this->_defaultClass()); 00065 } 00066 return $this->_items[$name]; 00067 }
hasItem | ( | $ | name | ) |
setDefaultClass | ( | $ | className | ) |
$_defaultClass = 'Varien_Convert_Container_Generic' [protected] |
Definition at line 38 of file Collection.php.
$_items = array() [protected] |
Definition at line 37 of file Collection.php.