Cart extends AbstractEntity implements PurchaseInterface, ItemHolderInterface Uses PointTrait
Cart
Tags
Table of Contents
$id | int | |
---|---|---|
$cart_key | string | |
$Customer | Customer | |
$lock | bool | |
$CartItems | Collection|\Eccube\Entity\CartItem[] | |
$pre_order_id | string|null | |
$total_price | string | |
$delivery_fee_total | string | |
$sort_no | int|null | |
$create_date | DateTime | |
$update_date | DateTime | |
$errors | \Eccube\Service\PurchaseFlow\InvalidItemException[] | |
$add_point | string | |
$use_point | string | |
$AnnotationReader | ||
__wakeup() | mixed | |
__construct() | mixed | |
getId() | int | |
getCartKey() | string | |
setCartKey() | mixed | |
getLock() | bool | |
setLock() | Cart | |
getPreOrderId() | string|null | |
setPreOrderId() | Cart | |
addCartItem() | Cart | |
clearCartItems() | Cart | |
getCartItems() | ArrayCollection|\Eccube\Entity\CartItem[] | |
getItems() | Alias of getCartItems() | mixed |
setCartItems() | Cart | |
setTotalPrice() | Set total. | Cart |
getTotalPrice() | string | |
setTotal() | Alias of setTotalPrice. | mixed |
getTotal() | Alias of getTotalPrice | int |
getTotalQuantity() | int | |
addItem() | mixed | |
removeItem() | mixed | |
getQuantity() | 個数の合計を返します。 | int |
setDeliveryFeeTotal() | 送料合計を設定します。 | mixed |
getDeliveryFeeTotal() | 送料合計を返します。 | int |
getCustomer() | Customer | |
setCustomer() | mixed | |
setSortNo() | Set sortNo. | Cart |
getSortNo() | Get sortNo. | int|null |
setCreateDate() | Set createDate. | Cart |
getCreateDate() | Get createDate. | DateTime |
setUpdateDate() | Set updateDate. | Cart |
getUpdateDate() | Get updateDate. | DateTime |
setDiscount() | 値引き合計を設定します。 | mixed |
setCharge() | 手数料合計を設定します。 | mixed |
setTax() | 税額合計を設定します。 | mixed |
setAddPoint() | Set addPoint | Order |
getAddPoint() | Get addPoint | string |
setUsePoint() | Set usePoint | Order |
getUsePoint() | Get usePoint | 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
$cart_key
private
string
$cart_key
Tags
$Customer
private
Customer
$Customer
Tags
$lock
private
bool
$lock
= false
$CartItems
private
Collection|\Eccube\Entity\CartItem[]
$CartItems
Tags
$pre_order_id
private
string|null
$pre_order_id
= null
Tags
$total_price
private
string
$total_price
Tags
$delivery_fee_total
private
string
$delivery_fee_total
Tags
$sort_no
private
int|null
$sort_no
Tags
$create_date
private
DateTime
$create_date
Tags
$update_date
private
DateTime
$update_date
Tags
$errors
private
\Eccube\Service\PurchaseFlow\InvalidItemException[]
$errors
= []
$add_point
private
string
$add_point
= '0'
Tags
$use_point
private
string
$use_point
= '0'
Tags
$AnnotationReader
private
mixed
$AnnotationReader
Methods
__wakeup()
public
__wakeup(
)
: mixed
Return values
mixed__construct()
public
__construct(
)
: mixed
Return values
mixedgetId()
public
getId(
)
: int
Return values
intgetCartKey()
public
getCartKey(
)
: string
Return values
stringsetCartKey()
public
setCartKey(
$cartKey :
string
)
: mixed
Parameters
- $cartKey : string
Return values
mixedgetLock()
public
getLock(
)
: bool
Tags
Return values
boolsetLock()
public
setLock(
$lock :
bool
)
: Cart
Parameters
- $lock : bool
Tags
Return values
CartgetPreOrderId()
public
getPreOrderId(
)
: string|null
Return values
string|nullsetPreOrderId()
public
setPreOrderId(
$pre_order_id :
int
)
: Cart
Parameters
- $pre_order_id : int
Return values
CartaddCartItem()
public
addCartItem(
$CartItem :
CartItem
)
: Cart
Parameters
- $CartItem : CartItem
Return values
CartclearCartItems()
public
clearCartItems(
)
: Cart
Return values
CartgetCartItems()
public
getCartItems(
)
: ArrayCollection|\Eccube\Entity\CartItem[]
Return values
ArrayCollection|\Eccube\Entity\CartItem[]getItems()
Alias of getCartItems()
public
getItems(
)
: mixed
Return values
mixedsetCartItems()
public
setCartItems(
$CartItems :
\Eccube\Entity\CartItem[]
)
: Cart
Parameters
- $CartItems : \Eccube\Entity\CartItem[]
Return values
CartsetTotalPrice()
Set total.
public
setTotalPrice(
$total_price :
int
)
: Cart
Parameters
- $total_price : int
Return values
CartgetTotalPrice()
public
getTotalPrice(
)
: string
Return values
stringsetTotal()
Alias of setTotalPrice.
public
setTotal(
$total :
mixed
)
: mixed
Parameters
- $total : mixed
Return values
mixedgetTotal()
Alias of getTotalPrice
public
getTotal(
)
: int
Return values
intgetTotalQuantity()
public
getTotalQuantity(
)
: int
Return values
intaddItem()
public
addItem(
$item :
ItemInterface
)
: mixed
Parameters
- $item : ItemInterface
Return values
mixedremoveItem()
public
removeItem(
$item :
ItemInterface
)
: mixed
Parameters
- $item : ItemInterface
Return values
mixedgetQuantity()
個数の合計を返します。
public
getQuantity(
)
: int
Return values
intsetDeliveryFeeTotal()
送料合計を設定します。
public
setDeliveryFeeTotal(
$total :
mixed
)
: mixed
Parameters
- $total : mixed
Return values
mixedgetDeliveryFeeTotal()
送料合計を返します。
public
getDeliveryFeeTotal(
)
: int
Return values
intgetCustomer()
public
getCustomer(
)
: Customer
Return values
CustomersetCustomer()
public
setCustomer(
[ $Customer :
Customer
= null ]
)
: mixed
Parameters
- $Customer : Customer = null
Return values
mixedsetSortNo()
Set sortNo.
public
setSortNo(
[ $sortNo :
int|null
= null ]
)
: Cart
Parameters
- $sortNo : int|null = null
Return values
CartgetSortNo()
Get sortNo.
public
getSortNo(
)
: int|null
Return values
int|nullsetCreateDate()
Set createDate.
public
setCreateDate(
$createDate :
DateTime
)
: Cart
Parameters
- $createDate : DateTime
Return values
CartgetCreateDate()
Get createDate.
public
getCreateDate(
)
: DateTime
Return values
DateTimesetUpdateDate()
Set updateDate.
public
setUpdateDate(
$updateDate :
DateTime
)
: Cart
Parameters
- $updateDate : DateTime
Return values
CartgetUpdateDate()
Get updateDate.
public
getUpdateDate(
)
: DateTime
Return values
DateTimesetDiscount()
値引き合計を設定します。
public
setDiscount(
$total :
mixed
)
: mixed
Parameters
- $total : mixed
Return values
mixedsetCharge()
手数料合計を設定します。
public
setCharge(
$total :
mixed
)
: mixed
Parameters
- $total : mixed
Return values
mixedsetTax()
税額合計を設定します。
public
setTax(
$total :
mixed
)
: mixed
Parameters
- $total : mixed
Tags
Return values
mixedsetAddPoint()
Set addPoint
public
setAddPoint(
$addPoint :
string
)
: Order
Parameters
- $addPoint : string
Return values
OrdergetAddPoint()
Get addPoint
public
getAddPoint(
)
: string
Return values
stringsetUsePoint()
Set usePoint
public
setUsePoint(
$usePoint :
string
)
: Order
Parameters
- $usePoint : string
Return values
OrdergetUsePoint()
Get usePoint
public
getUsePoint(
)
: 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], ...]