Skip to content

Instantly share code, notes, and snippets.

@sagikazarmark
Created October 19, 2014 10:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sagikazarmark/d3db9a9e93fa61482b11 to your computer and use it in GitHub Desktop.
Save sagikazarmark/d3db9a9e93fa61482b11 to your computer and use it in GitHub Desktop.
Task example
<?php
class Task implements TaskInterface
{
public function run()
{
// ... some basic logic
// emit is just an example, the command logic is important here
$result = $this->emit(new InputCommand('Please give me some input!'));
// ... so something with your result
$this->emit(new OutputCommand('Here is the resule'));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment