2016-09-23 22:57:35 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace Mine\SeekerBundle\Controller;
|
|
|
|
|
|
2016-12-11 18:25:19 +01:00
|
|
|
//use CL\Slack\Payload\ChatPostMessagePayload;
|
|
|
|
|
//use CL\Slack\Payload\UsersListPayload;
|
|
|
|
|
//use CL\Slack\Transport\ApiClient;
|
2016-09-23 22:57:35 +02:00
|
|
|
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
2016-11-30 20:15:56 +01:00
|
|
|
use Symfony\Component\HttpFoundation\Request;
|
2016-09-23 22:57:35 +02:00
|
|
|
|
|
|
|
|
class GameController extends Controller
|
|
|
|
|
{
|
2016-10-25 11:19:50 +02:00
|
|
|
public function indexAction()
|
|
|
|
|
{
|
2016-12-11 18:25:19 +01:00
|
|
|
// $apiClient = new ApiClient('xoxp-107639806167-107029084564-115427085733-cccaa4f96c89c87ce680c7f22acfd001');
|
|
|
|
|
//
|
|
|
|
|
// $usersListPayload = new UsersListPayload();
|
|
|
|
|
// $usersList = $apiClient->send($usersListPayload);
|
|
|
|
|
//
|
|
|
|
|
// dump($usersList);
|
|
|
|
|
//
|
|
|
|
|
// $payload = new ChatPostMessagePayload();
|
|
|
|
|
// $payload->setChannel('#general');
|
|
|
|
|
// $payload->setAsUser(true);
|
|
|
|
|
// $payload->setText('Hello world!');
|
|
|
|
|
|
|
|
|
|
// $response = $apiClient->send($payload);
|
|
|
|
|
|
|
|
|
|
// if ($response->isOk()) {
|
|
|
|
|
// dump('bazmeg');
|
|
|
|
|
// } else {
|
|
|
|
|
// dump($response->getError());
|
|
|
|
|
// dump($response->getErrorExplanation());
|
|
|
|
|
// }
|
|
|
|
|
|
2016-10-25 11:19:50 +02:00
|
|
|
return $this->render('MineSeekerBundle:Game:index.html.twig');
|
|
|
|
|
}
|
|
|
|
|
|
2016-11-30 20:15:56 +01:00
|
|
|
public function playAction(Request $request)
|
2016-09-23 22:57:35 +02:00
|
|
|
{
|
2016-10-25 11:19:50 +02:00
|
|
|
return $this->render('MineSeekerBundle:Game:play.html.twig', array(
|
2016-11-30 20:15:56 +01:00
|
|
|
'env' => $this->container->getParameter('kernel.environment'),
|
|
|
|
|
'ssl' => $request->isSecure() ? 'true' : 'false'
|
2016-10-25 11:19:50 +02:00
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
|
2016-12-10 14:43:28 +01:00
|
|
|
public function slackAction(Request $request)
|
2016-10-25 11:19:50 +02:00
|
|
|
{
|
2016-12-08 14:35:28 +01:00
|
|
|
|
2016-09-23 22:57:35 +02:00
|
|
|
}
|
2016-12-21 18:46:32 +01:00
|
|
|
|
|
|
|
|
public function privacyAction()
|
|
|
|
|
{
|
|
|
|
|
return $this->render('MineSeekerBundle:Official:privacy.html.twig');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function termsAction()
|
|
|
|
|
{
|
|
|
|
|
return $this->render('MineSeekerBundle:Official:terms.html.twig');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function contactAction()
|
|
|
|
|
{
|
|
|
|
|
return $this->render('MineSeekerBundle:Official:contact.html.twig');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function landingAction()
|
|
|
|
|
{
|
|
|
|
|
return $this->render('MineSeekerBundle:Official:landing.html.twig');
|
|
|
|
|
}
|
2016-09-23 22:57:35 +02:00
|
|
|
}
|