public static createExisting ( $data ) : static | ||
$data | ||
return | static |
public static function createExisting($data)
{
$newRequest = new static($data);
$newRequest->setId($data['id']);
$newRequest->setExists(true);
return $newRequest;
}
/** * Load data to collection. * * @param $data * @return static */ public function load($data) { foreach ($data as $row) { $this->put($row['id'], RequestEntity::createExisting($row)); } return $this; }