Last active
August 29, 2015 14:27
-
-
Save hello-josh/73bca17c39e76ae12cb4 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<?php | |
/** | |
* Simple Command Pattern Class | |
*/ | |
class MyCommand { | |
private $arg1; | |
private $arg2; | |
public function __construct($arg1, $arg2) { | |
$this->arg1 = $arg1; | |
$this->arg2 = $arg2; | |
} | |
public execute($something) { | |
// do something with $something, $this->arg1, and $this->arg2 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment