A product image.
Public Properties | |
const | DIR = 'images' |
const | TYPE = 'image' |
![]() | |
const | DIR = '' |
All subclasses must redeclare this to match their REST directory (without container). More... | |
const | TYPE = '' |
All subclasses must redeclare this to match their types. More... | |
![]() | |
const | MAP = [] |
const | PATCH = [] |
Public Methods | |
magic string | getCreatedAt () |
read-only More... | |
magic string | getFilename () |
magic int | getHeight () |
magic int | getPosition () |
getProduct () | |
magic string | getProductId () |
injected, read-only More... | |
magic string | getUpdatedAt () |
read-only More... | |
magic string[] | getVariantIds () |
magic int | getWidth () |
magic bool | hasVariantIds () |
magic $this | setAttachment (string $base64) |
magic $this | setFilename (string $filename) |
magic $this | setHeight (int $height) |
magic $this | setPosition (int $position) |
magic $this | setSrc (string $url) |
magic $this | setVariantIds (string[] $ids) |
magic $this | setWidth (int $width) |
![]() | |
string | __toString () |
null string | getId () |
string[] | getPoolKeys () |
bool | hasId () |
$this | reload () |
Fully reloads the entity from Shopify. More... | |
![]() | |
mixed | __call (string $method, array $args) |
__construct ($caller, array $data=[]) | |
string | serialize () |
Dehydrated JSON encode. More... | |
array | toArray () |
void | unserialize ($serialized) |
![]() | |
$this | create () |
![]() | |
void | delete () |
![]() | |
$this | update () |
![]() | |
Metafield[] | getMetafields () |
Metafield | newMetafield () |
Factory. More... | |
Protected Methods | |
_container () | |
The container/owner object, if any. More... | |
string | _metafieldType () |
![]() | |
mixed | _get (string $field) |
Lazy-loads missing fields. More... | |
void | _onDelete () |
void | _onSave () |
void | _reload (string $field) |
![]() | |
mixed | _hydrate (string $class, $item) |
A factory that also hydrates / caches entities. More... | |
array | _select ($subject, callable $filter,... $args) |
Magic method: selectField(callable $filter) More... | |
$this | _setData (array $data) |
Clears all diffs and sets all data, hydrating mapped fields. More... | |
$this | _setField (string $field, $value) |
Sets a value, hydrating if mapped, and clears the diff. More... | |
![]() | |
string | _dir () |
The POST directory. More... | |
Additional Inherited Members | |
![]() | |
Api | $api |
Pool | $pool |
![]() | |
static null self | load ($caller, string $id, array $query=[]) |
static self[] | loadAll ($caller, string $path, array $query=[]) |
|
protected |
|
finalprotected |
Reimplemented from MetafieldTrait.
magic string getCreatedAt | ( | ) |
read-only
magic string getFilename | ( | ) |
magic int getHeight | ( | ) |
magic int getPosition | ( | ) |
magic string getProductId | ( | ) |
injected, read-only
magic string getUpdatedAt | ( | ) |
read-only
magic string [] getVariantIds | ( | ) |
magic int getWidth | ( | ) |
magic bool hasVariantIds | ( | ) |
magic $this setHeight | ( | int | $height | ) |
magic $this setPosition | ( | int | $position | ) |
magic $this setVariantIds | ( | string[] | $ids | ) |
magic $this setWidth | ( | int | $width | ) |