Skip to content

Commit 627c75e

Browse files
committed
Merge branch 'sync'
2 parents 9243523 + a0c75b3 commit 627c75e

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

src/Concept/Provider.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,4 +104,29 @@ final public function dateFormatter(): IDateFormatter
104104
return $this->DateFormatter
105105
?? ($this->DateFormatter = $this->getDateFormatter());
106106
}
107+
108+
/**
109+
* Get the date formatter cached by dateFormatter(), or null if it hasn't
110+
* been cached
111+
*/
112+
final protected function getCachedDateFormatter(): ?IDateFormatter
113+
{
114+
return $this->DateFormatter ?? null;
115+
}
116+
117+
/**
118+
* Set or unset the date formatter returned by dateFormatter()
119+
*
120+
* @return $this
121+
*/
122+
final protected function setDateFormatter(?IDateFormatter $formatter)
123+
{
124+
if ($formatter === null) {
125+
unset($this->DateFormatter);
126+
} else {
127+
$this->DateFormatter = $formatter;
128+
}
129+
130+
return $this;
131+
}
107132
}

src/Sync/Support/SyncIntrospector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ static function (
600600
DeferredSyncEntity::deferList($provider, $context->push($entity), $relationship, $data[$key], $entity->{$property});
601601
return;
602602
}
603-
$entity->{$property} = $relationship::provideList($data[$key], $provider, $context->getConformity(), $context->push($entity));
603+
$entity->{$property} = $relationship::provideList($data[$key], $provider, $context->getConformity(), $context->push($entity))->toArray();
604604
return;
605605
}
606606
if (is_scalar($data[$key])) {

0 commit comments

Comments
 (0)