*/ class Mage_Dataflow_Model_Convert_Container_Collection { protected $_items = array(); protected $_defaultClass = 'Mage_Dataflow_Model_Convert_Container_Generic'; public function setDefaultClass($className) { $this->_defaultClass = $className; return $this; } public function addItem($name, Mage_Dataflow_Model_Convert_Container_Interface $item) { if (is_null($name)) { if ($item->getName()) { $name = $item->getName(); } else { $name = sizeof($this->_items); } } $this->_items[$name] = $item; return $item; } public function getItem($name) { if (!isset($this->_items[$name])) { $this->addItem($name, new $this->_defaultClass()); } return $this->_items[$name]; } public function hasItem($name) { return isset($this->_items[$name]); } }