From 1eee94d2604fb43b5a4a21c281c72ad356906a88 Mon Sep 17 00:00:00 2001 From: Fbenas Date: Sun, 12 Mar 2017 23:57:42 +0000 Subject: Added identify form and Ratchet websockets test stuff --- src/Message/Welcome.php | 62 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 src/Message/Welcome.php (limited to 'src/Message') diff --git a/src/Message/Welcome.php b/src/Message/Welcome.php new file mode 100644 index 0000000..8a121f4 --- /dev/null +++ b/src/Message/Welcome.php @@ -0,0 +1,62 @@ + + */ +class Welcome extends Base +{ + /** + * The list of vars we need to inject + * + * @var array + */ + protected $injects = ['name', 'gameCode']; + + /** + * The array of important vars + * + * @var string + */ + protected $important = ['name', 'gameCode']; + + /** + * Inject + * @var string + */ + public $name; + + /** + * Second inject + * + * @var string + */ + public $gameCode; + + /** + * Construct to set any inject vars from functions if required + * + * @author Phil Burton + */ + public function __construct(Handler $handler) + { + $this->inject = $this->getInject(); + parent::__construct($handler); + } + + /** + * Get our inject value + * + * @author Phil Burton + * @return string + */ + public function getInject() + { + return (string) time(); + } +} -- cgit v1.2.3