Article
+ Inheritance diagram for Article:

Description

Public Properties

const DIR = 'articles'
 
const MAP
 
const TYPE = 'article'
 
- Public Properties inherited from AbstractEntity
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...
 
- Public Properties inherited from Data
const MAP = []
 
const PATCH = []
 

Public Methods

magic string getAuthor ()
 
Blog getBlog ()
 
magic string getBlogId ()
 injected More...
 
magic string getBodyHtml ()
 
Comment[] getComments ()
 
int getCommentsCount ()
 
magic string getCreatedAt ()
 
magic string getHandle ()
 
magic null Image getImage ()
 
magic string getPublished ()
 
magic string getPublishedAt ()
 
magic string getSummaryHtml ()
 
magic string getTags ()
 
magic null string getTemplateSuffix ()
 
magic string getTitle ()
 
magic string getUpdatedAt ()
 
magic string getUserId ()
 
Comment newComment ()
 Factory. More...
 
magic Comment[] selectComments (callable $filter)
 fn( Comment $comment ): bool More...
 
magic $this setAuthor (string $author)
 
magic $this setBodyHtml (string $html)
 
magic $this setHandle (string $handle)
 
magic $this setImage (?Image $image)
 
magic $this setPublished (string $published)
 
magic $this setPublishedAt (string $iso8601)
 
magic $this setSummaryHtml (string $html)
 
magic $this setTags (string $tags)
 
magic $this setTemplateSuffix (?string $suffix)
 
magic $this setTitle (string $title)
 
- Public Methods inherited from AbstractEntity
string __toString ()
 
null string getId ()
 
string[] getPoolKeys ()
 
bool hasId ()
 
$this reload ()
 Fully reloads the entity from Shopify. More...
 
- Public Methods inherited from Data
mixed __call (string $method, array $args)
 
 __construct ($caller, array $data=[])
 
string serialize ()
 Dehydrated JSON encode. More...
 
array toArray ()
 
void unserialize ($serialized)
 
- Public Methods inherited from CreateTrait
$this create ()
 
- Public Methods inherited from DeleteTrait
void delete ()
 
- Public Methods inherited from UpdateTrait
$this update ()
 
- Public Methods inherited from MetafieldTrait
Metafield[] getMetafields ()
 
Metafield newMetafield ()
 Factory. More...
 

Protected Methods

 _container ()
 The container/owner object, if any. More...
 
- Protected Methods inherited from AbstractEntity
mixed _get (string $field)
 Lazy-loads missing fields. More...
 
void _onDelete ()
 
void _onSave ()
 
void _reload (string $field)
 
- Protected Methods inherited from Data
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...
 
- Protected Methods inherited from CreateTrait
string _dir ()
 The POST directory. More...
 
- Protected Methods inherited from MetafieldTrait
string _metafieldType ()
 

Additional Inherited Members

- Protected Properties inherited from Data
Api $api
 
Pool $pool
 
- Public Static Methods inherited from AbstractEntity
static null self load ($caller, string $id, array $query=[])
 
static self[] loadAll ($caller, string $path, array $query=[])
 

Properties

◆ MAP

const MAP
Initial value:
= [
'image' => Data::class
]

Methods

◆ _container()

_container ( )
protected

The container/owner object, if any.

Returns
null|AbstractEntity

Reimplemented from AbstractEntity.

◆ getAuthor()

magic string getAuthor ( )
Returns
string

◆ getBlog()

Blog getBlog ( )
Returns
Blog

◆ getBlogId()

magic string getBlogId ( )

injected

Returns
string

◆ getBodyHtml()

magic string getBodyHtml ( )
Returns
string

◆ getComments()

Comment [] getComments ( )
Returns
Comment[]

◆ getCommentsCount()

int getCommentsCount ( )
Returns
int

◆ getCreatedAt()

magic string getCreatedAt ( )
Returns
string

◆ getHandle()

magic string getHandle ( )
Returns
string

◆ getImage()

magic null Image getImage ( )
Returns
null|Image

◆ getPublished()

magic string getPublished ( )
Returns
string

◆ getPublishedAt()

magic string getPublishedAt ( )
Returns
string

◆ getSummaryHtml()

magic string getSummaryHtml ( )
Returns
string

◆ getTags()

magic string getTags ( )
Returns
string

◆ getTemplateSuffix()

magic null string getTemplateSuffix ( )
Returns
null|string

◆ getTitle()

magic string getTitle ( )
Returns
string

◆ getUpdatedAt()

magic string getUpdatedAt ( )
Returns
string

◆ getUserId()

magic string getUserId ( )
Returns
string

◆ newComment()

Comment newComment ( )

Factory.

Returns
Comment

◆ selectComments()

magic Comment [] selectComments ( callable  $filter)

fn( Comment $comment ): bool

Returns
Comment[]

◆ setAuthor()

magic $this setAuthor ( string  $author)
Returns
$this

◆ setBodyHtml()

magic $this setBodyHtml ( string  $html)
Returns
$this

◆ setHandle()

magic $this setHandle ( string  $handle)
Returns
$this

◆ setImage()

magic $this setImage ( ?Image  $image)
Returns
$this

◆ setPublished()

magic $this setPublished ( string  $published)
Returns
$this

◆ setPublishedAt()

magic $this setPublishedAt ( string  $iso8601)
Returns
$this

◆ setSummaryHtml()

magic $this setSummaryHtml ( string  $html)
Returns
$this

◆ setTags()

magic $this setTags ( string  $tags)
Returns
$this

◆ setTemplateSuffix()

magic $this setTemplateSuffix ( ?string  $suffix)
Returns
$this

◆ setTitle()

magic $this setTitle ( string  $title)
Returns
$this