EC-CUBE4 APIドキュメント

TaxRule extends AbstractEntity

TaxRule

Tags
ORM\Table

(name="dtb_tax_rule")

ORM\InheritanceType

("SINGLE_TABLE")

ORM\DiscriminatorColumn

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

ORM\HasLifecycleCallbacks

()

ORM\Entity

(repositoryClass="Eccube\Repository\TaxRuleRepository")

Table of Contents

DEFAULT_TAX_RULE_ID 1
$sort_no int
$id int
$tax_rate string
$tax_adjust string
$apply_date DateTime
$create_date DateTime
$update_date DateTime
$ProductClass ProductClass
$Creator Member
$Country Country
$Pref Pref
$Product Product
$RoundingType RoundingType
$AnnotationReader
isDefaultTaxRule() is default bool
setSortNo() Set sortNo TaxRule
getSortNo() Get sortNo int
getId() Get id. int
setTaxRate() Set taxRate. TaxRule
getTaxRate() Get taxRate. string
setTaxAdjust() Set taxAdjust. TaxRule
getTaxAdjust() Get taxAdjust. string
setApplyDate() Set applyDate. TaxRule
getApplyDate() Get applyDate. DateTime
setCreateDate() Set createDate. TaxRule
getCreateDate() Get createDate. DateTime
setUpdateDate() Set updateDate. TaxRule
getUpdateDate() Get updateDate. DateTime
setProductClass() Set productClass. TaxRule
getProductClass() Get productClass. ProductClass|null
setCreator() Set creator. TaxRule
getCreator() Get creator. Member|null
setCountry() Set country. TaxRule
getCountry() Get country. Country|null
setPref() Set pref. TaxRule
getPref() Get pref. Pref|null
setProduct() Set product. TaxRule
getProduct() Get product. Product|null
setRoundingType() Set roundingType. TaxRule
getRoundingType() Get roundingType. RoundingType|null
compareTo() 自分自身と Target を比較し, ソートのための数値を返す. int
isProductTaxRule() 商品別税率設定が適用されているかどうか. bool
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

Constants

DEFAULT_TAX_RULE_ID

public int $DEFAULT_TAX_RULE_ID = 1

Properties

$id

private int $id
Tags
ORM\Column

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

ORM\Id
ORM\GeneratedValue

(strategy="IDENTITY")

$tax_rate

private string $tax_rate = ""
Tags
ORM\Column

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

$tax_adjust

private string $tax_adjust = ""
Tags
ORM\Column

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

$apply_date

private DateTime $apply_date
Tags
ORM\Column

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

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

$ProductClass

private ProductClass $ProductClass
Tags
ORM\OneToOne

(targetEntity="Eccube\Entity\ProductClass", inversedBy="TaxRule")

ORM\JoinColumns

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

$Creator

private Member $Creator
Tags
ORM\ManyToOne

(targetEntity="Eccube\Entity\Member")

ORM\JoinColumns

({ @ORM\JoinColumn(name="creator_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") })

$Product

private Product $Product
Tags
ORM\ManyToOne

(targetEntity="Eccube\Entity\Product")

ORM\JoinColumns

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

$RoundingType

private RoundingType $RoundingType
Tags
ORM\ManyToOne

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

ORM\JoinColumns

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

Methods

isDefaultTaxRule()

is default

public isDefaultTaxRule( ) : bool
Return values
bool

setSortNo()

Set sortNo

public setSortNo( $sortNo : int ) : TaxRule
Parameters
$sortNo : int
Return values
TaxRule

getSortNo()

Get sortNo

public getSortNo( ) : int
Return values
int

getId()

Get id.

public getId( ) : int
Return values
int

setTaxRate()

Set taxRate.

public setTaxRate( $taxRate : string ) : TaxRule
Parameters
$taxRate : string
Return values
TaxRule

getTaxRate()

Get taxRate.

public getTaxRate( ) : string
Return values
string

setTaxAdjust()

Set taxAdjust.

public setTaxAdjust( $taxAdjust : string ) : TaxRule
Parameters
$taxAdjust : string
Return values
TaxRule

getTaxAdjust()

Get taxAdjust.

public getTaxAdjust( ) : string
Return values
string

setApplyDate()

Set applyDate.

public setApplyDate( $applyDate : DateTime ) : TaxRule
Parameters
$applyDate : DateTime
Return values
TaxRule

getApplyDate()

Get applyDate.

public getApplyDate( ) : DateTime
Return values
DateTime

setCreateDate()

Set createDate.

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

getCreateDate()

Get createDate.

public getCreateDate( ) : DateTime
Return values
DateTime

setUpdateDate()

Set updateDate.

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

getUpdateDate()

Get updateDate.

public getUpdateDate( ) : DateTime
Return values
DateTime

compareTo()

自分自身と Target を比較し, ソートのための数値を返す.

public compareTo( $Target : TaxRule ) : int

以下の順で比較し、

同一であれば 0 自分の方が大きければ正の整数 小さければ負の整数を返す.

  1. 商品別税率が有効
  2. apply_date
  3. sort_no

このメソッドは usort() 関数などで使用する.

Parameters
$Target : TaxRule

比較対象の TaxRule

Return values
int

isProductTaxRule()

商品別税率設定が適用されているかどうか.

public isProductTaxRule( ) : bool
Return values
bool

商品別税率が適用されている場合 true

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