EC-CUBE4 APIドキュメント

Cart extends AbstractEntity implements PurchaseInterface, ItemHolderInterface Uses PointTrait

Cart

Tags
ORM\Table

(name="dtb_cart", indexes={ @ORM\Index(name="dtb_cart_update_date_idx", columns={"update_date"}) }, uniqueConstraints={ @ORM\UniqueConstraint(name="dtb_cart_pre_order_id_idx", columns={"pre_order_id"}) }))

ORM\InheritanceType

("SINGLE_TABLE")

ORM\DiscriminatorColumn

(name="discriminator_type", type="string", length=255)

ORM\HasLifecycleCallbacks

()

ORM\Entity

(repositoryClass="Eccube\Repository\CartRepository")

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
ORM\Column

(name="id", type="integer", options={"unsigned":true})

ORM\Id
ORM\GeneratedValue

(strategy="IDENTITY")

$cart_key

private string $cart_key
Tags
ORM\Column

(name="cart_key", type="string", nullable=true)

$Customer

private Customer $Customer
Tags
ORM\ManyToOne

(targetEntity="Eccube\Entity\Customer")

ORM\JoinColumns

({ @ORM\JoinColumn(name="customer_id", referencedColumnName="id") })

$lock

private bool $lock = false

$CartItems

private Collection|\Eccube\Entity\CartItem[] $CartItems
Tags
ORM\OneToMany

(targetEntity="Eccube\Entity\CartItem", mappedBy="Cart", cascade={"persist"})

$pre_order_id

private string|null $pre_order_id = null
Tags
ORM\Column

(name="pre_order_id", type="string", length=255, nullable=true)

$total_price

private string $total_price
Tags
ORM\Column

(name="total_price", type="decimal", precision=12, scale=2, options={"unsigned":true,"default":0})

$delivery_fee_total

private string $delivery_fee_total
Tags
ORM\Column

(name="delivery_fee_total", type="decimal", precision=12, scale=2, options={"unsigned":true,"default":0})

$sort_no

private int|null $sort_no
Tags
ORM\Column

(name="sort_no", type="smallint", nullable=true, options={"unsigned":true})

$create_date

private DateTime $create_date
Tags
ORM\Column

(name="create_date", type="datetimetz")

$update_date

private DateTime $update_date
Tags
ORM\Column

(name="update_date", type="datetimetz")

$errors

private \Eccube\Service\PurchaseFlow\InvalidItemException[] $errors = []

$add_point

private string $add_point = '0'
Tags
ORM\Column

(name="add_point", type="decimal", precision=12, scale=0, options={"unsigned":true,"default":0})

$use_point

private string $use_point = '0'
Tags
ORM\Column

(name="use_point", type="decimal", precision=12, scale=0, options={"unsigned":true,"default":0})

Methods

__wakeup()

public __wakeup( ) : mixed
Return values
mixed

__construct()

public __construct( ) : mixed
Return values
mixed

getId()

public getId( ) : int
Return values
int

getCartKey()

public getCartKey( ) : string
Return values
string

setCartKey()

public setCartKey( $cartKey : string ) : mixed
Parameters
$cartKey : string
Return values
mixed

getLock()

public getLock( ) : bool
Tags
deprecated

使用しないので削除予定

Return values
bool

setLock()

public setLock( $lock : bool ) : Cart
Parameters
$lock : bool
Tags
deprecated

使用しないので削除予定

Return values
Cart

getPreOrderId()

public getPreOrderId( ) : string|null
Return values
string|null

setPreOrderId()

public setPreOrderId( $pre_order_id : int ) : Cart
Parameters
$pre_order_id : int
Return values
Cart

clearCartItems()

public clearCartItems( ) : Cart
Return values
Cart

getCartItems()

public getCartItems( ) : ArrayCollection|\Eccube\Entity\CartItem[]
Return values
ArrayCollection|\Eccube\Entity\CartItem[]

getItems()

Alias of getCartItems()

public getItems( ) : mixed
Return values
mixed

setCartItems()

public setCartItems( $CartItems : \Eccube\Entity\CartItem[] ) : Cart
Parameters
$CartItems : \Eccube\Entity\CartItem[]
Return values
Cart

setTotalPrice()

Set total.

public setTotalPrice( $total_price : int ) : Cart
Parameters
$total_price : int
Return values
Cart

getTotalPrice()

public getTotalPrice( ) : string
Return values
string

setTotal()

Alias of setTotalPrice.

public setTotal( $total : mixed ) : mixed
Parameters
$total : mixed
Return values
mixed

getTotal()

Alias of getTotalPrice

public getTotal( ) : int
Return values
int

getTotalQuantity()

public getTotalQuantity( ) : int
Return values
int

getQuantity()

個数の合計を返します。

public getQuantity( ) : int
Return values
int

setDeliveryFeeTotal()

送料合計を設定します。

public setDeliveryFeeTotal( $total : mixed ) : mixed
Parameters
$total : mixed
Return values
mixed

getDeliveryFeeTotal()

送料合計を返します。

public getDeliveryFeeTotal( ) : int
Return values
int

setCustomer()

public setCustomer( [ $Customer : Customer = null ] ) : mixed
Parameters
$Customer : Customer = null
Return values
mixed

setSortNo()

Set sortNo.

public setSortNo( [ $sortNo : int|null = null ] ) : Cart
Parameters
$sortNo : int|null = null
Return values
Cart

getSortNo()

Get sortNo.

public getSortNo( ) : int|null
Return values
int|null

setCreateDate()

Set createDate.

public setCreateDate( $createDate : DateTime ) : Cart
Parameters
$createDate : DateTime
Return values
Cart

getCreateDate()

Get createDate.

public getCreateDate( ) : DateTime
Return values
DateTime

setUpdateDate()

Set updateDate.

public setUpdateDate( $updateDate : DateTime ) : Cart
Parameters
$updateDate : DateTime
Return values
Cart

getUpdateDate()

Get updateDate.

public getUpdateDate( ) : DateTime
Return values
DateTime

setDiscount()

値引き合計を設定します。

public setDiscount( $total : mixed ) : mixed
Parameters
$total : mixed
Return values
mixed

setCharge()

手数料合計を設定します。

public setCharge( $total : mixed ) : mixed
Parameters
$total : mixed
Return values
mixed

setTax()

税額合計を設定します。

public setTax( $total : mixed ) : mixed
Parameters
$total : mixed
Tags
deprecated
Return values
mixed

setAddPoint()

Set addPoint

public setAddPoint( $addPoint : string ) : Order
Parameters
$addPoint : string
Return values
Order

getAddPoint()

Get addPoint

public getAddPoint( ) : string
Return values
string

setUsePoint()

Set usePoint

public setUsePoint( $usePoint : string ) : Order
Parameters
$usePoint : string
Return values
Order

getUsePoint()

Get usePoint

public getUsePoint( ) : string
Return values
string

offsetExists()

public offsetExists( $offset : mixed ) : mixed
Parameters
$offset : mixed
Return values
mixed

offsetSet()

public offsetSet( $offset : mixed , $value : mixed ) : mixed
Parameters
$offset : mixed
$value : mixed
Return values
mixed

offsetGet()

public offsetGet( $offset : mixed ) : mixed
Parameters
$offset : mixed
Return values
mixed

offsetUnset()

public offsetUnset( $offset : mixed ) : mixed
Parameters
$offset : mixed
Return values
mixed

setPropertiesFromArray()

引数の連想配列を元にプロパティを設定します.

public setPropertiesFromArray( $arrProps : array [, $excludeAttribute : string[] = [] ] [, $parentClass : ReflectionClass = null ] ) : mixed

DBから取り出した連想配列を, プロパティへ設定する際に使用します.

Parameters
$arrProps : array

プロパティの情報を格納した連想配列

$excludeAttribute : string[] = []

除外したいフィールド名の配列

$parentClass : ReflectionClass = null

親のクラス. 本メソッドの内部的に使用します.

Return values
mixed

toArray()

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
array

toNormalizedArray()

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
array

toJSON()

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
string

toXML()

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
string

copyProperties()

コピー元のオブジェクトのフィールド名を指定して、同名のフィールドに値をコピー

public copyProperties( $srcObject : object [, $excludeAttribute : string[] = [] ] ) : AbstractEntity
Parameters
$srcObject : object

コピー元のオブジェクト

$excludeAttribute : string[] = []

除外したいフィールド名の配列

Return values
AbstractEntity

getAnnotationReader()

Get AnnotationReader.

public getAnnotationReader( ) : Reader
Return values
Reader

getEntityIdentifierAsArray()

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], ...]

Search results