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

		foreach( $entry as $name => $value )
		{
			switch( $name )
			{
				case 'coupon.code.id': $item->setId( $value ); break;
				case 'coupon.code.code': $item->setCode( $value ); break;
				case 'coupon.code.count': $item->setCount( $value ); break;
				case 'coupon.code.couponid': $item->setCouponId( $value ); break;
				case 'coupon.code.datestart':
					if( $value != '' )
					{
						$value = str_replace( 'T', ' ', $value );
						$entry->{'coupon.code.datestart'} = $value;
						$item->setDateStart( $value );
					}
					break;
				case 'coupon.code.dateend':
					if( $value != '' )
					{
						$value = str_replace( 'T', ' ', $value );
						$entry->{'coupon.code.dateend'} = $value;
						$item->setDateEnd( $value );
					}
					break;
			}
		}

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

		foreach( $entry as $name => $value )
		{
			switch( $name )
			{
				case 'coupon.code.id': $item->setId( $value ); break;
				case 'coupon.code.code': $item->setCode( $value ); break;
				case 'coupon.code.count': $item->setCount( $value ); break;
				case 'coupon.code.couponid': $item->setCouponId( $value ); break;
				case 'coupon.code.datestart':
					if( $value != '' )
					{
						$value = str_replace( 'T', ' ', $value );
						$entry->{'coupon.code.datestart'} = $value;
						$item->setDateStart( $value );
					}
					break;
				case 'coupon.code.dateend':
					if( $value != '' )
					{
						$value = str_replace( 'T', ' ', $value );
						$entry->{'coupon.code.dateend'} = $value;
						$item->setDateEnd( $value );
					}
					break;
			}
		}

		return $item;
	}
protected function _createItem ( array $ entry ) { $ item = $ this -> _manager -> createItem ( ) ; foreach ( $ entry as $ name => $ value ) { switch ( $ name ) { case 'coupon.code.id' : $ item -> setId ( $ value ) ; break ; case 'coupon.code.code' : $ item -> setCode ( $ value ) ; break ; case 'coupon.code.count' : $ item -> setCount ( $ value ) ; break ; case 'coupon.code.couponid' : $ item -> setCouponId ( $ value ) ; break ; case 'coupon.code.datestart' : if ( $ value != '' ) { $ value = str_replace ( 'T' , ' ' , $ value ) ; $ entry -> { 'coupon.code.datestart' } = $ value ; $ item -> setDateStart ( $ value ) ; } break ; case 'coupon.code.dateend' : if ( $ value != '' ) { $ value = str_replace ( 'T' , ' ' , $ value ) ; $ entry -> { 'coupon.code.dateend' } = $ value ; $ item -> setDateEnd ( $ value ) ; } break ; } } return $ item ; }
Creates a new coupon code item and sets the properties from the given array.

@param array $entry Associative list of name and value properties using the "coupon.code" prefix
@return MShop_Coupon_Item_Code_Interface Coupon code item
Creates a new coupon code item and sets the properties from the given array .