ExternalData
+ Inheritance diagram for ExternalData:

Description

Public Methods

 __construct (Task $task, array $data=[])
 
magic null string getData ()
 
mixed getDataJsonDecoded ()
 The JSON decoded data, or null. More...
 
magic null string getGid ()
 
Task getTask ()
 
magic bool hasData ()
 
magic bool hasGid ()
 
magic $this setData (?string $data)
 32768 chars max. More...
 
$this setDataJsonEncoded ($data)
 JSON encodes and sets. More...
 
magic $this setGid (?string $gid)
 1024 chars max. More...
 
- Public Methods inherited from Data
mixed __call (string $method, array $args)
 Magic method handler. More...
 
 __construct (Api|self $caller, array $data=[])
 
array __serialize ()
 
void __unserialize (array $data)
 
bool isDiff ()
 Whether the instance has changes. More...
 
array jsonSerialize ()
 
bool offsetExists (mixed $offset)
 
mixed offsetGet (mixed $offset)
 
void offsetSet (mixed $offset, mixed $value)
 
void offsetUnset (mixed $offset)
 
array toArray (bool $diff=false)
 Dehydrated data. More...
 

Protected Methods

$this _set (string $field, $value)
 Marks the task's external diff. More...
 
- Protected Methods inherited from Data
mixed _get (string $field)
 Magic method: getField() More...
 
bool _has (string $field)
 Magic method: hasField() More...
 
_hydrate (string $class, $item)
 Sub-data factory that draws from the entity pool. More...
 
bool _is (string $field)
 Magic method: isField() More...
 
bool _of (string $resourceSubtype)
 Magic method: ofResourceSubtypeValue() More...
 
array _select (string|iterable $subject, callable $filter,... $args)
 Magic method: selectField(callable $filter) More...
 
void _setData (array $data)
 Clears all diffs and sets all data, hydrating mapped fields. More...
 
void _setField (string $field, $value)
 Sets a value, hydrating if mapped, and clears the diff. More...
 

Additional Inherited Members

- Protected Properties inherited from Data
readonly Api Api $api
 
array array self[] AbstractEntity[] $data = []
 
array bool[] $diff = []
 
const MAP = []
 

Constructor

◆ __construct()

__construct ( Task  $task,
array  $data = [] 
)
Parameters
Task$task
array$data

Methods

◆ _set()

$this _set ( string  $field,
  $value 
)
protected

Marks the task's external diff.

Parameters
string$field
mixed$value
Returns
$this

Reimplemented from Data.

◆ getData()

magic null string getData ( )
Returns
null|string

◆ getDataJsonDecoded()

mixed getDataJsonDecoded ( )

The JSON decoded data, or null.

Returns
mixed

◆ getGid()

magic null string getGid ( )
Returns
null|string

◆ getTask()

Task getTask ( )
Returns
Task

◆ hasData()

magic bool hasData ( )
Returns
bool

◆ hasGid()

magic bool hasGid ( )
Returns
bool

◆ setData()

magic $this setData ( ?string  $data)

32768 chars max.

Returns
$this

◆ setDataJsonEncoded()

$this setDataJsonEncoded (   $data)

JSON encodes and sets.

This field is nullable, so null is not encoded.

Parameters
mixed$data
Returns
$this

◆ setGid()

magic $this setGid ( ?string  $gid)

1024 chars max.

Returns
$this