class CartItem extends ReactiveObject

Traits

Properties

protected array $hooks from  Hooks
protected Event[] $eventHandlers from  Events
protected $timestamps
protected array $attributes from  Accessors
array $modified from  Accessors
ReactiveObject|ItemCollection|null $parent from  ReactiveObject
protected $defaults
protected $readOnlyAttributes
int $entry_id
string $entry_name
int $no_of_entries
string $type
int $variant_id
string $variant_value
string $variant_name
float $variant_cost
int $variant_weight
float $tax_percent
int $entries_weight
string $ip
string $user_agent
int $changed_in_cart
Carbon $reservation_start
Carbon $reservation_end
string $entries_comments
Properties $properties

Methods

addHook(string $name, callable $callback = null)

No description

from  Hooks
void
performHook(string $name)

No description

from  Hooks
void
performHooks()

No description

from  Hooks
on(string $eventName, callable $handler = null)

Attaches an event handler for a given event

from  Events
addEvent(Event $event)

Attaches an Event directly

from  Events
void
emit(string $event, mixed $payload = null)

Emits an event to parent

from  Events
void
trigger(string $eventName, mixed $payload = null)

Invokes the event handlers for the given event

from  Events
serializeTimestamp($value)

No description

array
toArray()

Get the raw attributes

mixed
__get(string $property)

No description

__set(string $property, mixed $value)

No description

bool
__isset(string $property)

No description

__unset(string $key)

No description

bool
offsetExists(string $property)

No description

mixed
offsetGet(string $property)

No description

mixed
offsetSet(string $property, mixed $value)

No description

void
offsetUnset(string $key)

No description

string
__toString()

No description

__construct(object|array $attributes = [], object|null $parent = null)

No description

setParent(ReactiveObject|ItemCollection|null $parent)

No description

ReactiveObject|ItemCollection|null
getParent()

No description

ReactiveObject|ItemCollection|null
getRootParent()

No description

int
getIdAttribute(string|int $id = null)

No description

array
__debugInfo()

No description

static ReactiveObject
factory(object|array $attributes = [], object|null $parent = null)

No description

array
jsonSerialize()

No description

static 
hasTrait($trait)

No description

save(array $updates = [])

No description

delete()

No description

getEntryIdAttribute($value)

No description

getNoOfEntriesAttribute($value)

No description

getVariantIdAttribute($value)

No description

getVariantCostAttribute($value)

No description

getTaxPercentAttribute($value)

No description

getTaxCostAttribute($value)

No description

getEntriesCostAttribute($value)

No description

getEntriesTotalAttribute($value)

No description

getChangedInCartAttribute($value)

No description

getReservationStartAttribute($value)

No description

getReservationEndAttribute($value)

No description

getOriginalVariantCostAttribute($value)

No description

getOriginalEntriesTotalAttribute($value)

No description

getOriginalEntriesCostAttribute($value)

No description

getOriginalTaxCostAttribute($value)

No description

Properties
getPropertiesAttribute(mixed $properties)

No description

DiscountData
getDiscountDataAttribute(mixed $data)

No description

Details

in Hooks at line 15
Hooks addHook(string $name, callable $callback = null)

Parameters

string $name
callable $callback

Return Value

Hooks

in Hooks at line 30
void performHook(string $name)

Parameters

string $name

Return Value

void

in Hooks at line 40
void performHooks()

Return Value

void

in Events at line 17
Events on(string $eventName, callable $handler = null)

Attaches an event handler for a given event

Parameters

string $eventName
callable $handler

Return Value

Events

in Events at line 30
Events addEvent(Event $event)

Attaches an Event directly

Parameters

Event $event

Return Value

Events

in Events at line 43
void emit(string $event, mixed $payload = null)

Emits an event to parent

Parameters

string $event
mixed $payload = null

Return Value

void

in Events at line 57
void trigger(string $eventName, mixed $payload = null)

Invokes the event handlers for the given event

Parameters

string $eventName
mixed $payload = null

Return Value

void

in Timestamps at line 18
serializeTimestamp($value)

Parameters

$value

in Accessors at line 30
array toArray()

Get the raw attributes

Return Value

array

in Accessors at line 39
mixed __get(string $property)

Parameters

string $property

Return Value

mixed

in Accessors at line 67
__set(string $property, mixed $value)

Parameters

string $property
mixed $value

in Accessors at line 97
bool __isset(string $property)

Parameters

string $property

Return Value

bool

in Accessors at line 105
__unset(string $key)

Parameters

string $key

in Accessors at line 116
bool offsetExists(string $property)

Parameters

string $property

Return Value

bool

in Accessors at line 127
mixed offsetGet(string $property)

Parameters

string $property

Return Value

mixed

in Accessors at line 137
mixed offsetSet(string $property, mixed $value)

Parameters

string $property
mixed $value

Return Value

mixed

in Accessors at line 146
void offsetUnset(string $key)

Parameters

string $key

Return Value

void

in Accessors at line 154
string __toString()

Return Value

string

in ReactiveObject at line 30
__construct(object|array $attributes = [], object|null $parent = null)

Parameters

object|array $attributes = []
object|null $parent = null

in ReactiveObject at line 53
ReactiveObject setParent(ReactiveObject|ItemCollection|null $parent)

Parameters

ReactiveObject|ItemCollection|null $parent

Return Value

ReactiveObject

in ReactiveObject at line 62
ReactiveObject|ItemCollection|null getParent()

Return Value

ReactiveObject|ItemCollection|null

in ReactiveObject at line 70
ReactiveObject|ItemCollection|null getRootParent()

Return Value

ReactiveObject|ItemCollection|null

in ReactiveObject at line 85
int getIdAttribute(string|int $id = null)

Parameters

string|int $id

Return Value

int

in ReactiveObject at line 93
array __debugInfo()

Return Value

array

in ReactiveObject at line 109
static ReactiveObject factory(object|array $attributes = [], object|null $parent = null)

Parameters

object|array $attributes = []
object|null $parent = null

Return Value

ReactiveObject

at line 174
array jsonSerialize()

Return Value

array

in ReactiveObject at line 142
static hasTrait($trait)

Parameters

$trait

in CartItemAPI at line 16
CartItemAPI save(array $updates = [])

Parameters

array $updates

Return Value

CartItemAPI

Exceptions

Exception

in CartItemAPI at line 36
delete()

Exceptions

Exception

at line 75
getEntryIdAttribute($value)

Parameters

$value

at line 80
getNoOfEntriesAttribute($value)

Parameters

$value

at line 85
getVariantIdAttribute($value)

Parameters

$value

at line 90
getVariantCostAttribute($value)

Parameters

$value

at line 95
getTaxPercentAttribute($value)

Parameters

$value

at line 100
getTaxCostAttribute($value)

Parameters

$value

at line 105
getEntriesCostAttribute($value)

Parameters

$value

at line 110
getEntriesTotalAttribute($value)

Parameters

$value

at line 115
getChangedInCartAttribute($value)

Parameters

$value

at line 120
getReservationStartAttribute($value)

Parameters

$value

at line 125
getReservationEndAttribute($value)

Parameters

$value

at line 130
getOriginalVariantCostAttribute($value)

Parameters

$value

at line 135
getOriginalEntriesTotalAttribute($value)

Parameters

$value

at line 140
getOriginalEntriesCostAttribute($value)

Parameters

$value

at line 145
getOriginalTaxCostAttribute($value)

Parameters

$value

at line 154
Properties getPropertiesAttribute(mixed $properties)

Parameters

mixed $properties

Return Value

Properties

at line 166
DiscountData getDiscountDataAttribute(mixed $data)

Parameters

mixed $data

Return Value

DiscountData