Status
+ Inheritance diagram for Status:

Description

Public Properties

final const COLOR_GREEN = 'green'
 
final const COLOR_RED = 'red'
 
final const COLOR_YELLOW = 'yellow'
 
final const TYPE = 'project_status'
 
- Public Properties inherited from AbstractEntity
const TYPE = ''
 All entity classes must redeclare this to match their resource_type. More...
 

Protected Properties

final const DIR = 'project_statuses'
 
const MAP
 
- Protected Properties inherited from AbstractEntity
const DIR = ''
 All entity classes must redeclare this to match their REST directory. More...
 
const OPT_FIELDS = []
 
- Protected Properties inherited from Data
readonly Api Api $api
 
array array self[] AbstractEntity[] $data = []
 
array bool[] $diff = []
 
const MAP = []
 

Public Methods

 __construct (Project $project, array $data=[])
 
$this create ()
 
void delete ()
 
magic string getColor ()
 green|red|yellow More...
 
magic string getCreatedAt ()
 RFC3339x. More...
 
magic User getCreatedBy ()
 
Project getProject ()
 
magic string getText ()
 
magic string getTitle ()
 
magic $this setColor (string $color)
 
magic $this setText (string $text)
 
magic $this setTitle (string $title)
 
- Public Methods inherited from AbstractEntity
string __toString ()
 The entity's canonical REST path. More...
 
null string getGid ()
 
bool hasGid ()
 
$this reload ()
 Fully reloads the entity from Asana. 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...
 
- Public Methods inherited from ImmutableArrayTrait
void offsetSet (mixed $offset, mixed $value)
 Throws unless overridden. More...
 
- Public Methods inherited from DateTimeTrait
null DateTimeInterface _getDateTime ()
 Returns a date-time field as an immutable object. More...
 

Protected Methods

Project _getParentNode ()
 
void _setData (array $data)
 
- Protected Methods inherited from AbstractEntity
mixed _get (string $field)
 Lazy-loads missing fields. More...
 
void _reload (string $field)
 
- Protected Methods inherited from Data
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...
 
$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...
 

Properties

◆ MAP

const MAP
protected
Initial value:
= [
'created_by' => User::class
]

Constructor

◆ __construct()

__construct ( Project  $project,
array  $data = [] 
)
Parameters
Project$project
array$data

Methods

◆ _getParentNode()

Project _getParentNode ( )
finalprotected
Returns
Project

Reimplemented from CreateTrait.

◆ _setData()

void _setData ( array  $data)
protected
Parameters
array$data
Returns
void

Reimplemented from AbstractEntity.

◆ create()

$this create ( )
Returns
$this

Reimplemented from CreateTrait.

◆ delete()

void delete ( )
Returns
void

Reimplemented from DeleteTrait.

◆ getColor()

magic string getColor ( )

green|red|yellow

Returns
string

◆ getCreatedAt()

magic string getCreatedAt ( )

RFC3339x.

Returns
string

◆ getCreatedBy()

magic User getCreatedBy ( )
Returns
User

◆ getProject()

Project getProject ( )
Returns
Project

◆ getText()

magic string getText ( )
Returns
string

◆ getTitle()

magic string getTitle ( )
Returns
string

◆ setColor()

magic $this setColor ( string  $color)
Depends:
create-only, green|red|yellow
Returns
$this

◆ setText()

magic $this setText ( string  $text)
Depends:
create-only
Returns
$this

◆ setTitle()

magic $this setTitle ( string  $title)
Depends:
create-only
Returns
$this