Skip to content

Commit fd3e189

Browse files
committed
update
1 parent b584a80 commit fd3e189

File tree

4 files changed

+22
-3
lines changed

4 files changed

+22
-3
lines changed

app/config/config.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,5 +133,11 @@ fos_comment:
133133
thread: COC\COCBundle\Entity\Thread
134134

135135

136+
k_phoen_sms_sender:
137+
pool: memory # can be null (and is by default)
138+
providers: [nexmo]
136139

140+
nexmo:
141+
api_key: 6996a14b
142+
api_secret: 56751ffa
137143

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232

3333
"liip/imagine-bundle": "~1.2",
3434
"friendsofsymfony/jsrouting-bundle": "~1.5",
35-
"friendsofsymfony/comment-bundle": "~2.0"
35+
"friendsofsymfony/comment-bundle": "~2.0",
36+
"kphoen/sms-sender-bundle": "dev-master"
3637
},
3738
"scripts": {
3839
"post-install-cmd": [

src/COC/COCBundle/Controller/DefaultController.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,23 @@
33
namespace COC\COCBundle\Controller;
44

55
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
6+
use Symfony\Component\HttpFoundation\Response;
67

78
class DefaultController extends Controller
89
{
10+
11+
public function sendSMSAction()
12+
{
13+
14+
$sms_sender = $this->get('sms.sender');
15+
$sms_sender->send('0782231874', 'Its thfdgfdgfdge answer.', 'Kévin');
16+
17+
18+
}
19+
920
public function indexAction($id_clan)
1021
{
22+
self::sendSMSAction();
1123

1224
$em = $this->getDoctrine()->getManager();
1325
$clan = $this->container->get('coc_cocbundle.clan_info')->getClan($id_clan);

src/COC/COCBundle/Controller/PlayerController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -396,8 +396,8 @@ public function playerAction (Request $request, $id_clan, $id_player)
396396
'formBase' => $formBase->createView(),
397397
'myGold' => $this->perDay($this->getMyGoldPerHour($player)),
398398
'myElixir' => $this->perDay($this->getMyElixirPerHour($player)),
399-
'myDarkElixir' => $this->perDay($this->getMyDarkElixirPerHour($player)),
400-
'maxDarkElixir' => $this->perDay($this->getMaxDarkElixirPerHour($player)),
399+
'myDarkElixir' => $this->$this->getMyDarkElixirPerHour($player)* 24,
400+
'maxDarkElixir' => $this->$this->getMaxDarkElixirPerHour($player) * 24,
401401
'maxElixirGold' => $this->perDay($this->getMaxGoldElixirPerHour($player)),
402402
'players' => $players
403403
));

0 commit comments

Comments
 (0)