PHP code example of maatify / huawei-hms-core

1. Go to this page and download the library: Download maatify/huawei-hms-core library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

maatify / huawei-hms-core example snippets



use Maatify\HMS\HMSCoreRequest;

/**
 * Created by Maatify.dev
 * User: Maatify.dev
 * Date: 2024-04-29
 * Time: 11:19 AM
 * https://www.Maatify.dev
 */
class HMSConnector extends HMSCoreRequest
{
    protected string $APP_ID_FROM_CONSOLE = __APP_ID_FROM_CONSOLE__;

    protected string|int $client_id = __client_id__;

    protected string $client_credentials = __client_credentials__;

    public function CallHMSByToken(string $title, string $message, string $token)
    {
        return $this
            ->SetTitle($title)
            ->SetMessage($message)
            ->SetTokens([$token])
            ->Load();
    }