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
oatrace\Venture\Project\Stadium;
$collection = Stadium::byId(12);
var_dump($collection->get('id')); // int(12)
var_dump($collection->get('name')); // string(27) "ボートレース住之江"
var_dump($collection->get('short_name')); // string(9) "住之江"
var_dump($collection->get('uri')); // string(32) "https://www.boatrace-suminoe.jp/"
$collection = Stadium::byName('ボートレース住之江');
var_dump($collection->get('id')); // int(12)
var_dump($collection->get('name')); // string(27) "ボートレース住之江"
var_dump($collection->get('short_name')); // string(9) "住之江"
var_dump($collection->get('uri')); // string(32) "https://www.boatrace-suminoe.jp/"
$collection = Stadium::byShortName('住之江');
var_dump($collection->get('id')); // int(12)
var_dump($collection->get('name')); // string(27) "ボートレース住之江"
var_dump($collection->get('short_name')); // string(9) "住之江"
var_dump($collection->get('uri')); // string(32) "https://www.boatrace-suminoe.jp/"
$collection = Stadium::byUri('suminoe');
var_dump($collection->get('id')); // int(12)
var_dump($collection->get('name')); // string(27) "ボートレース住之江"
var_dump($collection->get('short_name')); // string(9) "住之江"
var_dump($collection->get('uri')); // string(32) "https://www.boatrace-suminoe.jp/"