An event obtained via sync token or delivered to you via webhook.
Asana has a "feature" that squashes "duplicate" events into the oldest date, as well as removing events inbetween, effectively rewriting history.
As such, any particular sequence of events should not be greatly relied upon for continuity. Cached or already-pooled entities will be stale as well.
You should reload the resource and go off of that data instead.
Protected Properties | |
const | GRAPH |
const | MAP |
Protected Properties inherited from Data | |
readonly Api Api | $api |
array array self[] AbstractEntity[] | $data = [] |
array bool[] | $diff = [] |
const | MAP = [] |
Public Methods | |
magic string | getAction () |
The action-verb for the event. More... | |
magic null Change | getChange () |
The change made on the resource. More... | |
magic string | getCreatedAt () |
RFC3339x. More... | |
null array Project Section Task | getParent () |
The parent resource, if the event was relational. More... | |
array Attachment CustomField Like Project Section Story Tag Task User | getResource () |
The relational child, or the entity that was changed. More... | |
magic null User | getUser () |
The initiator, if there was one. More... | |
magic bool | hasChange () |
False if the event was relational. More... | |
magic bool | hasParent () |
True if the event was relational. More... | |
magic bool | hasUser () |
When false, Asana initiated the event. More... | |
bool | wasAddition () |
bool | wasChange () |
bool | wasDeletion () |
bool | wasRemoval () |
bool | wasUndeletion () |
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... | |
Public Methods inherited from DateTimeTrait | |
null DateTimeInterface | _getDateTime () |
Returns a date-time field as an immutable object. More... | |
Protected Methods | |
void | _setData (array $data) |
Protected Methods inherited from Data | |
mixed | _get (string $field) |
Magic method: getField() More... | |
bool | _has (string $field) |
Magic method: hasField() More... | |
T | _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... | |
$this | _set (string $field, $value) |
Magic method: setField(mixed $value) More... | |
void | _setField (string $field, $value) |
Sets a value, hydrating if mapped, and clears the diff. More... | |
|
protected |
|
protected |
|
protected |
magic string getAction | ( | ) |
The action-verb for the event.
magic null Change getChange | ( | ) |
The change made on the resource.
magic string getCreatedAt | ( | ) |
RFC3339x.
The parent resource, if the event was relational.
array Attachment CustomField Like Project Section Story Tag Task User getResource | ( | ) |
The relational child, or the entity that was changed.
magic null User getUser | ( | ) |
The initiator, if there was one.
magic bool hasChange | ( | ) |
False if the event was relational.
magic bool hasParent | ( | ) |
True if the event was relational.
magic bool hasUser | ( | ) |
When false, Asana initiated the event.
("system")
|
final |
|
final |
|
final |
|
final |
|
final |