PHP code example of bvp / stadium
1. Go to this page and download the library: Download bvp/stadium 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/ */
bvp / stadium example snippets
VP\Stadium\Stadium;
/**
* @return array
*/
$stadium = Stadium::byNumber(12);
// or $stadium = Stadium::byNumber([12]);
print_r($stadium);
/*------------------------------
Array
(
[number] => 12
[name] => ボートレース住之江
[short_name] => 住之江
[hiragana_name] => ぼーとれーすすみのえ
[katakana_name] => ボートレーススミノエ
[english_name] => suminoe
[url] => https://www.boatrace-suminoe.jp/
)
------------------------------*/
/**
* @return array
*/
$stadium = Stadium::byName('ボートレース住之江');
// or $stadium = Stadium::byName(['ボートレース住之江']);
/**
* @return array
*/
$stadium = Stadium::byShortName('住之江');
// or $stadium = Stadium::byShortName(['住之江']);
/**
* @return array
*/
$stadium = Stadium::byHiraganaName('すみのえ');
// or $stadium = Stadium::byHiraganaName(['すみのえ']);
/**
* @return array
*/
$stadium = Stadium::byKatakanaName('スミノエ');
// or $stadium = Stadium::byKatakanaName(['スミノエ']);
/**
* @return array
*/
$stadium = Stadium::byEnglishName('suminoe');
// or $stadium = Stadium::byEnglishName(['suminoe']);
/**
* @return array
*/
$stadium = Stadium::byUrl('suminoe');
// or $stadium = Stadium::byUrl(['suminoe']);