diff options
author | Fbenas <philbeansburton@gmail.com> | 2017-03-21 23:29:59 +0000 |
---|---|---|
committer | Fbenas <philbeansburton@gmail.com> | 2017-03-21 23:29:59 +0000 |
commit | 79bc514b2dc91f997ed662427ffb0e0cb6c7a735 (patch) | |
tree | d0dae2659b0f9416deec6531fcdc425a3f8c9991 | |
parent | a74eee77954b4e874f032fdad735b283e0778902 (diff) |
-rw-r--r-- | src/Message/Name.php | 62 | ||||
-rw-r--r-- | web/welcome.php | 21 |
2 files changed, 81 insertions, 2 deletions
diff --git a/src/Message/Name.php b/src/Message/Name.php new file mode 100644 index 0000000..631fdd2 --- /dev/null +++ b/src/Message/Name.php @@ -0,0 +1,62 @@ +<?php + +namespace App\Message; + +use App\Message\Base; + +/** + * Name message + * + * @author Phil Burton <phil@pgburton.com> + */ +class Name extends Base +{ + /** + * The list of vars we need to inject + * + * @var array + */ + protected $injects = ['inject', 'second']; + + /** + * The array of important vars + * + * @var string + */ + protected $important = ['inject']; + + /** + * Inject + * @var string + */ + public $inject; + + /** + * Second inject + * + * @var string + */ + public $second = "second"; + + /** + * Construct to set any inject vars from functions if required + * + * @author Phil Burton <phil@pgburton.com> + */ + public function __construct(Handler $handler) + { + $this->inject = $this->getInject(); + parent::__construct($handler); + } + + /** + * Get our inject value + * + * @author Phil Burton <phil@pgburton.com> + * @return string + */ + public function getInject() + { + return (string) time(); + } +} diff --git a/web/welcome.php b/web/welcome.php index 568ecf2..6986f21 100644 --- a/web/welcome.php +++ b/web/welcome.php @@ -1,3 +1,20 @@ -<?php +<html> -echo $this->game->getHandler()->renderWelcome(); + <head> + <title>Welcome <?= $this->game->getHandler()->returnImportant('name') ?></title> + </head> + + <body> + + <h1><?= $this->game->getHandler()->renderWelcome() ?> + + <div class="user-list"> + <p>User List</p> + <ul> + + </ul> + </div> + + </body> + +</html> |