CartItem extends AbstractEntity implements ItemInterface Uses PointRateTrait
CartItem
Tags
Table of Contents
| $id | int | |
|---|---|---|
| $price | string | |
| $quantity | string | |
| $ProductClass | ProductClass | |
| $Cart | Cart | |
| $product_class_id | sessionのシリアライズのために使われる | int | 
| $point_rate | string | |
| $AnnotationReader | ||
| __sleep() | mixed | |
| getId() | int | |
| setPrice() | CartItem | |
| getPrice() | string | |
| setQuantity() | CartItem | |
| getQuantity() | string | |
| getTotalPrice() | int | |
| isProduct() | 商品明細かどうか. | bool | 
| isDeliveryFee() | 送料明細かどうか. | bool | 
| isCharge() | 手数料明細かどうか. | bool | 
| isDiscount() | 値引き明細かどうか. | bool | 
| isTax() | 税額明細かどうか. | bool | 
| isPoint() | ポイント明細かどうか. | bool | 
| getOrderItemType() | mixed | |
| setProductClass() | $this | |
| getProductClass() | ProductClass | |
| getProductClassId() | int|null | |
| getPriceIncTax() | mixed | |
| getCart() | Cart | |
| setCart() | mixed | |
| setPointRate() | Set pointRate | OrderItem | 
| getPointRate() | Get pointRate | string | 
| offsetExists() | mixed | |
| offsetSet() | mixed | |
| offsetGet() | mixed | |
| offsetUnset() | mixed | |
| setPropertiesFromArray() | 引数の連想配列を元にプロパティを設定します. | mixed | 
| toArray() | Convert to associative array. | array | 
| toNormalizedArray() | Convert to associative array, and normalize to association properties. | array | 
| toJSON() | Convert to JSON. | string | 
| toXML() | Convert to XML. | string | 
| copyProperties() | コピー元のオブジェクトのフィールド名を指定して、同名のフィールドに値をコピー | AbstractEntity | 
| setAnnotationReader() | Set AnnotationReader. | AbstractEntity | 
| getAnnotationReader() | Get AnnotationReader. | Reader | 
| getEntityIdentifierAsArray() | Convert to Entity of Identity value to associative array. | array | 
Properties
$id
        private
                int
        $id
            
                Tags
$price
        private
                string
        $price
         = ""    
                Tags
$quantity
        private
                string
        $quantity
         = ""    
                Tags
$ProductClass
        private
                ProductClass
        $ProductClass
            
                Tags
$Cart
        private
                Cart
        $Cart
            
                Tags
$product_class_id
sessionのシリアライズのために使われる
        private
                int
        $product_class_id
            
            
$point_rate
        private
                string
        $point_rate
            
                Tags
$AnnotationReader
        private
                mixed
        $AnnotationReader
            
            
Methods
__sleep()
        public
                                __sleep(
                )
        : mixed
    
    
    
        
            Return values
mixedgetId()
        public
                                getId(
                )
        : int
    
    
    
        
            Return values
intsetPrice()
        public
                                setPrice(
                    
                            $price :
                int
                            
                )
        : CartItem
    
    
            Parameters
- $price : int
 
Return values
CartItemgetPrice()
        public
                                getPrice(
                )
        : string
    
    
    
        
            Return values
stringsetQuantity()
        public
                                setQuantity(
                    
                            $quantity :
                int
                            
                )
        : CartItem
    
    
            Parameters
- $quantity : int
 
Return values
CartItemgetQuantity()
        public
                                getQuantity(
                )
        : string
    
    
    
        
            Return values
stringgetTotalPrice()
        public
                                getTotalPrice(
                )
        : int
    
    
    
        
            Return values
intisProduct()
商品明細かどうか.
        public
                                isProduct(
                )
        : bool
    
    
    
        
            Return values
bool —商品明細の場合 true
isDeliveryFee()
送料明細かどうか.
        public
                                isDeliveryFee(
                )
        : bool
    
    
    
        
            Return values
bool —送料明細の場合 true
isCharge()
手数料明細かどうか.
        public
                                isCharge(
                )
        : bool
    
    
    
        
            Return values
bool —手数料明細の場合 true
isDiscount()
値引き明細かどうか.
        public
                                isDiscount(
                )
        : bool
    
    
    
        
            Return values
bool —値引き明細の場合 true
isTax()
税額明細かどうか.
        public
                                isTax(
                )
        : bool
    
    
    
        
            Return values
bool —税額明細の場合 true
isPoint()
ポイント明細かどうか.
        public
                                isPoint(
                )
        : bool
    
    
    
        
            Return values
bool —ポイント明細の場合 true
getOrderItemType()
        public
                                getOrderItemType(
                )
        : mixed
    
    
    
        
            Return values
mixedsetProductClass()
        public
                                setProductClass(
                    
                            $ProductClass :
                ProductClass
                            
                )
        : $this
    
    
            Parameters
- $ProductClass : ProductClass
 
Return values
$thisgetProductClass()
        public
                                getProductClass(
                )
        : ProductClass
    
    
    
        
            Return values
ProductClassgetProductClassId()
        public
                                getProductClassId(
                )
        : int|null
    
    
    
        
            Return values
int|nullgetPriceIncTax()
        public
                                getPriceIncTax(
                )
        : mixed
    
    
    
        
            Return values
mixedgetCart()
        public
                                getCart(
                )
        : Cart
    
    
    
        
            Return values
CartsetCart()
        public
                                setCart(
                    
                            $Cart :
                Cart
                            
                )
        : mixed
    
    
            Parameters
- $Cart : Cart
 
Return values
mixedsetPointRate()
Set pointRate
        public
                                setPointRate(
                    
                            $pointRate :
                string
                            
                )
        : OrderItem
    
    
            Parameters
- $pointRate : string
 
Return values
OrderItemgetPointRate()
Get pointRate
        public
                                getPointRate(
                )
        : string
    
    
    
        
            Return values
stringoffsetExists()
        public
                                offsetExists(
                    
                            $offset :
                mixed
                            
                )
        : mixed
    
    
            Parameters
- $offset : mixed
 
Return values
mixedoffsetSet()
        public
                                offsetSet(
                    
                            $offset :
                mixed
                            
                    
            ,                 $value :
                mixed
                            
                )
        : mixed
    
    
            Parameters
- $offset : mixed
 - $value : mixed
 
Return values
mixedoffsetGet()
        public
                                offsetGet(
                    
                            $offset :
                mixed
                            
                )
        : mixed
    
    
            Parameters
- $offset : mixed
 
Return values
mixedoffsetUnset()
        public
                                offsetUnset(
                    
                            $offset :
                mixed
                            
                )
        : mixed
    
    
            Parameters
- $offset : mixed
 
Return values
mixedsetPropertiesFromArray()
引数の連想配列を元にプロパティを設定します.
        public
                                setPropertiesFromArray(
                    
                            $arrProps :
                array
                            
                    
            [,                 $excludeAttribute :
                string[]
                 = [] ]            
                    
            [,                 $parentClass :
                ReflectionClass
                 = null ]            
                )
        : mixed
    
        DBから取り出した連想配列を, プロパティへ設定する際に使用します.
Parameters
- $arrProps : array
 プロパティの情報を格納した連想配列
- $excludeAttribute : string[] = []
 除外したいフィールド名の配列
- $parentClass : ReflectionClass = null
 親のクラス. 本メソッドの内部的に使用します.
Return values
mixedtoArray()
Convert to associative array.
        public
                                toArray(
                    
            [                $excludeAttribute :
                array
                 = ['__initializer__', '__cloner__', '__isInitialized__', 'AnnotationReader'] ]            
                    
            [,                 $parentClass :
                ReflectionClass
                 = null ]            
                )
        : array
    
        Symfony Serializer Component is expensive, and hard to implementation. Use for encoder only.
Parameters
- $excludeAttribute : array = ['__initializer__', '__cloner__', '__isInitialized__', 'AnnotationReader']
 Array of field names to exclusion.
- $parentClass : ReflectionClass = null
 parent class. Use internally of this method..
Return values
arraytoNormalizedArray()
Convert to associative array, and normalize to association properties.
        public
                                toNormalizedArray(
                    
            [                $excludeAttribute :
                array
                 = ['__initializer__', '__cloner__', '__isInitialized__', 'AnnotationReader'] ]            
                )
        : array
    
        The type conversion such as:
- Datetime :: W3C datetime format string
 - AbstractEntity :: associative array such as [id => value]
 - PersistentCollection :: associative array of [[id => value], [id => value], ...]
 
Parameters
- $excludeAttribute : array = ['__initializer__', '__cloner__', '__isInitialized__', 'AnnotationReader']
 Array of field names to exclusion.
Return values
arraytoJSON()
Convert to JSON.
        public
                                toJSON(
                    
            [                $excludeAttribute :
                array
                 = ['__initializer__', '__cloner__', '__isInitialized__', 'AnnotationReader'] ]            
                )
        : string
    
    
            Parameters
- $excludeAttribute : array = ['__initializer__', '__cloner__', '__isInitialized__', 'AnnotationReader']
 Array of field names to exclusion.
Return values
stringtoXML()
Convert to XML.
        public
                                toXML(
                    
            [                $excludeAttribute :
                array
                 = ['__initializer__', '__cloner__', '__isInitialized__', 'AnnotationReader'] ]            
                )
        : string
    
    
            Parameters
- $excludeAttribute : array = ['__initializer__', '__cloner__', '__isInitialized__', 'AnnotationReader']
 Array of field names to exclusion.
Return values
stringcopyProperties()
コピー元のオブジェクトのフィールド名を指定して、同名のフィールドに値をコピー
        public
                                copyProperties(
                    
                            $srcObject :
                object
                            
                    
            [,                 $excludeAttribute :
                string[]
                 = [] ]            
                )
        : AbstractEntity
    
    
            Parameters
- $srcObject : object
 コピー元のオブジェクト
- $excludeAttribute : string[] = []
 除外したいフィールド名の配列
Return values
AbstractEntitysetAnnotationReader()
Set AnnotationReader.
        public
                                setAnnotationReader(
                    
                            $Reader :
                Reader
                            
                )
        : AbstractEntity
    
    
            Parameters
- $Reader : Reader
 
Return values
AbstractEntitygetAnnotationReader()
Get AnnotationReader.
        public
                                getAnnotationReader(
                )
        : Reader
    
    
    
        
            Return values
ReadergetEntityIdentifierAsArray()
Convert to Entity of Identity value to associative array.
        public
                                getEntityIdentifierAsArray(
                    
                            $Entity :
                AbstractEntity
                            
                )
        : array
    
    
            Parameters
- $Entity : AbstractEntity
 
Return values
array —associative array of [[id => value], [id => value], ...]