1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52:
<?php
abstract class AbstractResponse implements Response
{
private $view;
private $graphical_environment;
protected function __construct(GraphicalEnvironment $graphical_environment, View $view, $location_id = '')
{
$this->graphical_environment = $graphical_environment;
if (!empty($location_id) && AppContext::get_session()->location_id_already_exists($location_id))
{
$user_display_name = UserService::display_user_profile_link(AppContext::get_session()->get_user_on_location_id($location_id));
$view = new StringTemplate('# INCLUDE MESSAGE #');
$view->put('MESSAGE', MessageHelper::display(StringVars::replace_vars(LangLoader::get_message('content.is_locked.description', 'status-messages-common'), array('user_display_name' => $user_display_name ? $user_display_name : LangLoader::get_message('content.is_locked.another_user'))), MessageHelper::NOTICE));
}
$this->view = $view;
}
public function get_graphical_environment()
{
return $this->graphical_environment;
}
public function send()
{
$this->graphical_environment->display($this->view->render());
}
}
?>