\Revel\ModelsProduct

A product.

Summary

Methods
Properties
Constants
one()
many()
__construct()
__get()
__set()
__isset()
raw()
jsonSerialize()
data()
establishment()
category()
$id
$uuid
$name
$barcode
$establishmentId
$categoryId
$price
$active
No constants found
fields()
$revel
$raw
$data
N/A
No private methods found
No private properties found
N/A

Properties

$id

$id : integer

Type

integer

$uuid

$uuid : string

Type

string

$name

$name : string

Type

string

$barcode

$barcode : string

Type

string

$establishmentId

$establishmentId : integer

Type

integer

$categoryId

$categoryId : integer

Type

integer

$price

$price : float

Type

float

$active

$active : boolean

Type

boolean

$raw

$raw : mixed

Type

mixed

$data

$data : array

Type

array

Methods

one()

one(\Revel\Revel  $revel, mixed  $data = null) : static

Create one instance of this Model from source data.

Parameters

\Revel\Revel $revel

The Revel instance that created this model.

mixed $data

The source data.

Returns

static

many()

many(\Revel\Revel  $revel, array|mixed  $data) : array<mixed,static>

Create multiple instance of this Model from a list of source data.

Parameters

\Revel\Revel $revel

The Revel instance that created these models.

array|mixed $data

The source data.

Returns

array<mixed,static>

__construct()

__construct(\Revel\Revel  $revel, mixed  $data) 

Model constructor.

Parameters

\Revel\Revel $revel

The Revel instance that created this model.

mixed $data

The data to populate this Model with.

__get()

__get(  $prop) 

Parameters

$prop

__set()

__set(  $prop,   $value) 

Parameters

$prop
$value

__isset()

__isset(  $prop) 

Parameters

$prop

raw()

raw(string  $field = null, mixed  $fallback = null) : mixed

Get raw field data as seen in the API response.

Parameters

string $field

The field to get data for.

mixed $fallback

A fallback to use if the data does not exist.

Returns

mixed

jsonSerialize()

jsonSerialize() 

data()

data() : array

Returns

array

fields()

fields() : array

Returns

array