PHP code example of drsdre / yii2-footballapi

1. Go to this page and download the library: Download drsdre/yii2-footballapi 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/ */

    

drsdre / yii2-footballapi example snippets


'components' => [
    'footballapiApi' => [
        'class' => '\FootballAPI\Client',
        'api_key' => 'xxx',
    ]
    ...
]

$client = new \FootballAPI\Client([
    'api_key' => 'xxx',
]);

'components' => [
    'footballApi' => [
        'class' => '\FootballAPI\Client',
        'api_key' => 'xxx',
        'output_type' => 'PHP',
    ]
    ...
]

'components' => [
    'footballApiCache' => [
        'class' => 'yii\caching\FileCache',
    ],
    'footballApi' => [
        'class' => '\FootballAPI\Client',
        'api_key' => 'xxx',
        'cache' => 'footballApiCache',
    ]
    ...
]

$client = new \FootballAPI\Client([
    'api_key' => 'xxx',
    'service_ip' => '192.168.1.1',
]);