Skip to content

Instantly share code, notes, and snippets.

@mprince2k18
Last active March 21, 2024 04:41
Show Gist options
  • Save mprince2k18/aa59bd02c3be5b958d5c022335b674e3 to your computer and use it in GitHub Desktop.
Save mprince2k18/aa59bd02c3be5b958d5c022335b674e3 to your computer and use it in GitHub Desktop.
ModelChunkService
<?php
namespace App\Services;
class ModelChunkService
{
const INITIALIZED = 'initialized';
public function initializeModelChunk(array $chunk)
{
return $chunk['_value'] = $this->parseModel($chunk['_response'], $chunk['_value'], $chunk['_status'] = self::INITIALIZED);
}
protected function parseModel($response, $value)
{
return $value;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment