Skip to content

Commit

Permalink
example fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ahoulgrave committed Nov 13, 2016
1 parent 9a78fdf commit f8b3e21
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion examples/sample.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
use Silex\Application;
use Telegram\Bot\Silex\Command\ApplicationAwareCommand;
use Telegram\Bot\Silex\Provider\TelegramControllerProvider;
use Telegram\Bot\Silex\Provider\TelegramServiceProvider;
Expand All @@ -7,15 +8,22 @@

class MyCommand extends ApplicationAwareCommand
{
/**
* @inheritdoc
*/
protected $name = 'hello';

/**
* @inheritdoc
*/
public function handle($arguments)
{
$app = $this->getApplication();
$update = $this->getUpdate();
}
}

$app = new \Silex\Application();
$app = new Application();
$app->register(new TelegramServiceProvider(), [
'telegram.bot_api' => '<test>',
'telegram.commands' => [
Expand Down

0 comments on commit f8b3e21

Please sign in to comment.