EC-CUBE4 APIドキュメント

Customer extends AbstractEntity implements UserInterface

Customer

Tags
ORM\Table

(name="dtb_customer", uniqueConstraints={@ORM\UniqueConstraint (name="secret_key", columns={"secret_key"})}, indexes={@ORM\Index (name="dtb_customer_buy_times_idx", columns={"buy_times"}), @ORM\Index(name="dtb_customer_buy_total_idx", columns={"buy_total"}), @ORM\Index(name="dtb_customer_create_date_idx", columns={"create_date"}), @ORM\Index(name="dtb_customer_update_date_idx", columns={"update_date"}), @ORM\Index(name="dtb_customer_last_buy_date_idx", columns={"last_buy_date"}), @ORM\Index(name="dtb_customer_email_idx", columns={"email"})})

ORM\InheritanceType

("SINGLE_TABLE")

ORM\DiscriminatorColumn

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

ORM\HasLifecycleCallbacks

()

ORM\Entity

(repositoryClass="Eccube\Repository\CustomerRepository")

Table of Contents

$id int
$name01 string
$name02 string
$kana01 string|null
$kana02 string|null
$company_name string|null
$postal_code string|null
$addr01 string|null
$addr02 string|null
$email string
$phone_number string|null
$birth DateTime|null
$password string|null
$salt string|null
$secret_key string
$first_buy_date DateTime|null
$last_buy_date DateTime|null
$buy_times string|null
$buy_total string|null
$note string|null
$reset_key string|null
$reset_expire DateTime|null
$point string
$create_date DateTime
$update_date DateTime
$CustomerFavoriteProducts Collection
$CustomerAddresses Collection
$Orders Collection
$Status CustomerStatus
$Sex Sex
$Job Job
$Country Country
$Pref Pref
$AnnotationReader
__construct() Constructor mixed
__toString() string
getRoles() {@inheritdoc} mixed
getUsername() {@inheritdoc} mixed
eraseCredentials() {@inheritdoc} mixed
loadValidatorMetadata() mixed
getId() Get id. int
setName01() Set name01. Customer
getName01() Get name01. string
setName02() Set name02. Customer
getName02() Get name02. string
setKana01() Set kana01. Customer
getKana01() Get kana01. string|null
setKana02() Set kana02. Customer
getKana02() Get kana02. string|null
setCompanyName() Set companyName. Customer
getCompanyName() Get companyName. string|null
setPostalCode() Set postal_code. Customer
getPostalCode() Get postal_code. string|null
setAddr01() Set addr01. Customer
getAddr01() Get addr01. string|null
setAddr02() Set addr02. Customer
getAddr02() Get addr02. string|null
setEmail() Set email. Customer
getEmail() Get email. string
setPhoneNumber() Set phone_number. Customer
getPhoneNumber() Get phone_number. string|null
setBirth() Set birth. Customer
getBirth() Get birth. DateTime|null
setPassword() Set password. Customer
getPassword() Get password. string|null
setSalt() Set salt. Customer
getSalt() Get salt. string|null
setSecretKey() Set secretKey. Customer
getSecretKey() Get secretKey. string
setFirstBuyDate() Set firstBuyDate. Customer
getFirstBuyDate() Get firstBuyDate. DateTime|null
setLastBuyDate() Set lastBuyDate. Customer
getLastBuyDate() Get lastBuyDate. DateTime|null
setBuyTimes() Set buyTimes. Customer
getBuyTimes() Get buyTimes. string|null
setBuyTotal() Set buyTotal. Customer
getBuyTotal() Get buyTotal. string|null
setNote() Set note. Customer
getNote() Get note. string|null
setResetKey() Set resetKey. Customer
getResetKey() Get resetKey. string|null
setResetExpire() Set resetExpire. Customer
getResetExpire() Get resetExpire. DateTime|null
setCreateDate() Set createDate. Customer
getCreateDate() Get createDate. DateTime
setUpdateDate() Set updateDate. Customer
getUpdateDate() Get updateDate. DateTime
addCustomerFavoriteProduct() Add customerFavoriteProduct. Customer
removeCustomerFavoriteProduct() Remove customerFavoriteProduct. bool
getCustomerFavoriteProducts() Get customerFavoriteProducts. Collection
addCustomerAddress() Add customerAddress. Customer
removeCustomerAddress() Remove customerAddress. bool
getCustomerAddresses() Get customerAddresses. Collection
addOrder() Add order. Customer
removeOrder() Remove order. bool
getOrders() Get orders. Collection
setStatus() Set status. Customer
getStatus() Get status. CustomerStatus|null
setSex() Set sex. Customer
getSex() Get sex. Sex|null
setJob() Set job. Customer
getJob() Get job. Job|null
setCountry() Set country. Customer
getCountry() Get country. Country|null
setPref() Set pref. Customer
getPref() Get pref. Pref|null
setPoint() Set point Customer
getPoint() Get point 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")

$name01

private string $name01
Tags
ORM\Column

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

$name02

private string $name02
Tags
ORM\Column

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

$kana01

private string|null $kana01
Tags
ORM\Column

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

$kana02

private string|null $kana02
Tags
ORM\Column

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

$company_name

private string|null $company_name
Tags
ORM\Column

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

$postal_code

private string|null $postal_code
Tags
ORM\Column

(name="postal_code", type="string", length=8, nullable=true)

$addr01

private string|null $addr01
Tags
ORM\Column

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

$addr02

private string|null $addr02
Tags
ORM\Column

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

$email

private string $email
Tags
ORM\Column

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

$phone_number

private string|null $phone_number
Tags
ORM\Column

(name="phone_number", type="string", length=14, nullable=true)

$birth

private DateTime|null $birth
Tags
ORM\Column

(name="birth", type="datetimetz", nullable=true)

$password

private string|null $password
Tags
ORM\Column

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

$salt

private string|null $salt
Tags
ORM\Column

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

$secret_key

private string $secret_key
Tags
ORM\Column

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

$first_buy_date

private DateTime|null $first_buy_date
Tags
ORM\Column

(name="first_buy_date", type="datetimetz", nullable=true)

$last_buy_date

private DateTime|null $last_buy_date
Tags
ORM\Column

(name="last_buy_date", type="datetimetz", nullable=true)

$buy_times

private string|null $buy_times = ""
Tags
ORM\Column

(name="buy_times", type="decimal", precision=10, scale=0, nullable=true, options={"unsigned":true,"default":0})

$buy_total

private string|null $buy_total = ""
Tags
ORM\Column

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

$note

private string|null $note
Tags
ORM\Column

(name="note", type="string", length=4000, nullable=true)

$reset_key

private string|null $reset_key
Tags
ORM\Column

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

$reset_expire

private DateTime|null $reset_expire
Tags
ORM\Column

(name="reset_expire", type="datetimetz", nullable=true)

$point

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

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

$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")

$CustomerFavoriteProducts

private Collection $CustomerFavoriteProducts
Tags
ORM\OneToMany

(targetEntity="Eccube\Entity\CustomerFavoriteProduct", mappedBy="Customer", cascade={"remove"})

$CustomerAddresses

private Collection $CustomerAddresses
Tags
ORM\OneToMany

(targetEntity="Eccube\Entity\CustomerAddress", mappedBy="Customer", cascade={"remove"})

ORM\OrderBy

({ "id"="ASC" })

$Orders

private Collection $Orders
Tags
ORM\OneToMany

(targetEntity="Eccube\Entity\Order", mappedBy="Customer")

$Status

private CustomerStatus $Status
Tags
ORM\ManyToOne

(targetEntity="Eccube\Entity\Master\CustomerStatus")

ORM\JoinColumns

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

$Sex

private Sex $Sex
Tags
ORM\ManyToOne

(targetEntity="Eccube\Entity\Master\Sex")

ORM\JoinColumns

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

$Job

private Job $Job
Tags
ORM\ManyToOne

(targetEntity="Eccube\Entity\Master\Job")

ORM\JoinColumns

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

$Country

private Country $Country
Tags
ORM\ManyToOne

(targetEntity="Eccube\Entity\Master\Country")

ORM\JoinColumns

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

$Pref

private Pref $Pref
Tags
ORM\ManyToOne

(targetEntity="Eccube\Entity\Master\Pref")

ORM\JoinColumns

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

Methods

__construct()

Constructor

public __construct( ) : mixed
Return values
mixed

__toString()

public __toString( ) : string
Return values
string

getRoles()

{@inheritdoc}

public getRoles( ) : mixed
Return values
mixed

getUsername()

{@inheritdoc}

public getUsername( ) : mixed
Return values
mixed

eraseCredentials()

{@inheritdoc}

public eraseCredentials( ) : mixed
Return values
mixed

loadValidatorMetadata()

public static loadValidatorMetadata( $metadata : ClassMetadata ) : mixed
Parameters
$metadata : ClassMetadata
Return values
mixed

getId()

Get id.

public getId( ) : int
Return values
int

setName01()

Set name01.

public setName01( $name01 : string ) : Customer
Parameters
$name01 : string
Return values
Customer

getName01()

Get name01.

public getName01( ) : string
Return values
string

setName02()

Set name02.

public setName02( $name02 : string ) : Customer
Parameters
$name02 : string
Return values
Customer

getName02()

Get name02.

public getName02( ) : string
Return values
string

setKana01()

Set kana01.

public setKana01( [ $kana01 : string|null = null ] ) : Customer
Parameters
$kana01 : string|null = null
Return values
Customer

getKana01()

Get kana01.

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

setKana02()

Set kana02.

public setKana02( [ $kana02 : string|null = null ] ) : Customer
Parameters
$kana02 : string|null = null
Return values
Customer

getKana02()

Get kana02.

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

setCompanyName()

Set companyName.

public setCompanyName( [ $companyName : string|null = null ] ) : Customer
Parameters
$companyName : string|null = null
Return values
Customer

getCompanyName()

Get companyName.

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

setPostalCode()

Set postal_code.

public setPostalCode( [ $postal_code : string|null = null ] ) : Customer
Parameters
$postal_code : string|null = null
Return values
Customer

getPostalCode()

Get postal_code.

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

setAddr01()

Set addr01.

public setAddr01( [ $addr01 : string|null = null ] ) : Customer
Parameters
$addr01 : string|null = null
Return values
Customer

getAddr01()

Get addr01.

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

setAddr02()

Set addr02.

public setAddr02( [ $addr02 : string|null = null ] ) : Customer
Parameters
$addr02 : string|null = null
Return values
Customer

getAddr02()

Get addr02.

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

getEmail()

Get email.

public getEmail( ) : string
Return values
string

setPhoneNumber()

Set phone_number.

public setPhoneNumber( [ $phone_number : string|null = null ] ) : Customer
Parameters
$phone_number : string|null = null
Return values
Customer

getPhoneNumber()

Get phone_number.

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

setBirth()

Set birth.

public setBirth( [ $birth : DateTime|null = null ] ) : Customer
Parameters
$birth : DateTime|null = null
Return values
Customer

getBirth()

Get birth.

public getBirth( ) : DateTime|null
Return values
DateTime|null

setPassword()

Set password.

public setPassword( [ $password : string|null = null ] ) : Customer
Parameters
$password : string|null = null
Return values
Customer

getPassword()

Get password.

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

setSalt()

Set salt.

public setSalt( [ $salt : string|null = null ] ) : Customer
Parameters
$salt : string|null = null
Return values
Customer

getSalt()

Get salt.

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

setSecretKey()

Set secretKey.

public setSecretKey( $secretKey : string ) : Customer
Parameters
$secretKey : string
Return values
Customer

getSecretKey()

Get secretKey.

public getSecretKey( ) : string
Return values
string

setFirstBuyDate()

Set firstBuyDate.

public setFirstBuyDate( [ $firstBuyDate : DateTime|null = null ] ) : Customer
Parameters
$firstBuyDate : DateTime|null = null
Return values
Customer

getFirstBuyDate()

Get firstBuyDate.

public getFirstBuyDate( ) : DateTime|null
Return values
DateTime|null

setLastBuyDate()

Set lastBuyDate.

public setLastBuyDate( [ $lastBuyDate : DateTime|null = null ] ) : Customer
Parameters
$lastBuyDate : DateTime|null = null
Return values
Customer

getLastBuyDate()

Get lastBuyDate.

public getLastBuyDate( ) : DateTime|null
Return values
DateTime|null

setBuyTimes()

Set buyTimes.

public setBuyTimes( [ $buyTimes : string|null = null ] ) : Customer
Parameters
$buyTimes : string|null = null
Return values
Customer

getBuyTimes()

Get buyTimes.

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

setBuyTotal()

Set buyTotal.

public setBuyTotal( [ $buyTotal : string|null = null ] ) : Customer
Parameters
$buyTotal : string|null = null
Return values
Customer

getBuyTotal()

Get buyTotal.

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

setNote()

Set note.

public setNote( [ $note : string|null = null ] ) : Customer
Parameters
$note : string|null = null
Return values
Customer

getNote()

Get note.

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

setResetKey()

Set resetKey.

public setResetKey( [ $resetKey : string|null = null ] ) : Customer
Parameters
$resetKey : string|null = null
Return values
Customer

getResetKey()

Get resetKey.

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

setResetExpire()

Set resetExpire.

public setResetExpire( [ $resetExpire : DateTime|null = null ] ) : Customer
Parameters
$resetExpire : DateTime|null = null
Return values
Customer

getResetExpire()

Get resetExpire.

public getResetExpire( ) : DateTime|null
Return values
DateTime|null

setCreateDate()

Set createDate.

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

getCreateDate()

Get createDate.

public getCreateDate( ) : DateTime
Return values
DateTime

setUpdateDate()

Set updateDate.

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

getUpdateDate()

Get updateDate.

public getUpdateDate( ) : DateTime
Return values
DateTime

removeCustomerFavoriteProduct()

Remove customerFavoriteProduct.

public removeCustomerFavoriteProduct( $customerFavoriteProduct : CustomerFavoriteProduct ) : bool
Parameters
$customerFavoriteProduct : CustomerFavoriteProduct
Return values
bool

TRUE if this collection contained the specified element, FALSE otherwise.

getCustomerFavoriteProducts()

Get customerFavoriteProducts.

public getCustomerFavoriteProducts( ) : Collection
Return values
Collection

removeCustomerAddress()

Remove customerAddress.

public removeCustomerAddress( $customerAddress : CustomerAddress ) : bool
Parameters
$customerAddress : CustomerAddress
Return values
bool

TRUE if this collection contained the specified element, FALSE otherwise.

getCustomerAddresses()

Get customerAddresses.

public getCustomerAddresses( ) : Collection
Return values
Collection

removeOrder()

Remove order.

public removeOrder( $order : Order ) : bool
Parameters
$order : Order
Return values
bool

TRUE if this collection contained the specified element, FALSE otherwise.

getOrders()

Get orders.

public getOrders( ) : Collection
Return values
Collection

getSex()

Get sex.

public getSex( ) : Sex|null
Return values
Sex|null

getJob()

Get job.

public getJob( ) : Job|null
Return values
Job|null

getPoint()

Get point

public getPoint( ) : 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