SystemCommand.php 892 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
<?php
/**
 * This file is part of the TelegramBot package.
 *
 * (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Longman\TelegramBot\Commands;

13 14
use Longman\TelegramBot\Entities\ServerResponse;

15 16 17 18 19 20
/**
 * Abstract System Command Class
 */
abstract class SystemCommand extends Command
{
    /**
21 22
     * A system command just executes
     *
23
     * Although system commands should just work and return a successful ServerResponse,
24
     * each system command can override this method to add custom functionality.
25
     *
26
     * @return Entities\ServerResponse
27
     */
28
    public function execute()
29
    {
30 31
        //System command, return successful ServerResponse
        return new ServerResponse(['ok' => true, 'result' => true], null);
32 33
    }
}