Instantiator
+ Inheritance diagram for Instantiator:

Description

Public Methods

 __construct (ProjectTemplate $template)
 
Job instantiate ()
 
$this setDue (string|DateTimeInterface $due=null)
 Cannot be used alongside a start date. More...
 
magic $this setName (string $name)
 required More...
 
magic $this setPublic (bool $public)
 required, defaults to false More...
 
$this setStart (string|DateTimeInterface $start=null)
 Cannot be used alongside a due date. More...
 
magic $this setTeam (Team $team)
 
- 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 _setDate (string $fakeGid, string|DateTimeInterface $value=null)
 
- 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...
 
$this _set (string $field, $value)
 Magic method: setField(mixed $value) 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 ( ProjectTemplate  $template)
Parameters
ProjectTemplate$template

Methods

◆ instantiate()

Job instantiate ( )
Returns
Job Contains the new project when completed.

◆ setDue()

$this setDue ( string|DateTimeInterface  $due = null)

Cannot be used alongside a start date.

Parameters
null | string | DateTimeInterface$due
Returns
$this

◆ setName()

magic $this setName ( string  $name)

required

Returns
$this

◆ setPublic()

magic $this setPublic ( bool  $public)

required, defaults to false

Returns
$this

◆ setStart()

$this setStart ( string|DateTimeInterface  $start = null)

Cannot be used alongside a due date.

Parameters
null | string | DateTimeInterface$start
Returns
$this

◆ setTeam()

magic $this setTeam ( Team  $team)
Returns
$this