protected function _createItem( array $entry )
	{
		$item = $this->_manager->createItem();

		foreach( $entry as $name => $value )
		{
			switch( $name )
			{
				case 'product.stock.id': $item->setId( $value ); break;
				case 'product.stock.productid': $item->setProductId( $value ); break;
				case 'product.stock.warehouseid': $item->setWarehouseId( $value ); break;
				case 'product.stock.stocklevel':
					if( $value != '' ) {
						$item->setStocklevel( $value );
					}
					break;
				case 'product.stock.dateback':
					if( $value != '' )
					{
						$value = str_replace( 'T', ' ', $value );
						$entry->{'product.stock.dateback'} = $value;
						$item->setDateBack( $value );
					}
					break;
			}
		}

		return $item;
	}
protected function _createItem( array $entry )
	{
		$item = $this->_manager->createItem();

		foreach( $entry as $name => $value )
		{
			switch( $name )
			{
				case 'product.stock.id': $item->setId( $value ); break;
				case 'product.stock.productid': $item->setProductId( $value ); break;
				case 'product.stock.warehouseid': $item->setWarehouseId( $value ); break;
				case 'product.stock.stocklevel':
					if( $value != '' ) {
						$item->setStocklevel( $value );
					}
					break;
				case 'product.stock.dateback':
					if( $value != '' )
					{
						$value = str_replace( 'T', ' ', $value );
						$entry->{'product.stock.dateback'} = $value;
						$item->setDateBack( $value );
					}
					break;
			}
		}

		return $item;
	}
protected function _createItem ( array $ entry ) { $ item = $ this -> _manager -> createItem ( ) ; foreach ( $ entry as $ name => $ value ) { switch ( $ name ) { case 'product.stock.id' : $ item -> setId ( $ value ) ; break ; case 'product.stock.productid' : $ item -> setProductId ( $ value ) ; break ; case 'product.stock.warehouseid' : $ item -> setWarehouseId ( $ value ) ; break ; case 'product.stock.stocklevel' : if ( $ value != '' ) { $ item -> setStocklevel ( $ value ) ; } break ; case 'product.stock.dateback' : if ( $ value != '' ) { $ value = str_replace ( 'T' , ' ' , $ value ) ; $ entry -> { 'product.stock.dateback' } = $ value ; $ item -> setDateBack ( $ value ) ; } break ; } } return $ item ; }
Creates a new product stock item and sets the properties from the given array.

@param array $entry Associative list of name and value properties using the "product.stock" prefix
@return MShop_Product_Item_Stock_Interface Product stock item
Creates a new product stock item and sets the properties from the given array .