Last active
December 29, 2015 21:49
-
-
Save kovagoz/7733038 to your computer and use it in GitHub Desktop.
Brainstorm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class File | |
__construct($filename) | |
$this->workingCopy = new WorkingCopy($filename) | |
hasWorkingCopy() | |
return $this->workingCopy && $this->workingCopy->exists() | |
getWorkingCopy() | |
if (!$this->hasWorkingCopy()) | |
$this->workingCopy = new WorkingCopy(Storage::download($this->id)) | |
return $this->workingCopy | |
$image = new Image($parentImage) | |
$image->grab(200, 200) | |
$image->save() | |
$image = Image::mutate($parent_id) | |
$image->grab(200, 200); | |
$image->save() | |
class Image | |
__construct($image) | |
$this->workingCopy = $image->download() | |
class ImageRepo | |
mutate($id) | |
return new Image($this->find($id)) | |
Queue::wait($jobs[], $callback) // gearman sync jobs | |
wait() | |
if (!$driver instanceof SyncQueue) | |
throw new Exception |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment