PHP code example of natocto / football-data

1. Go to this page and download the library: Download natocto/football-data 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/ */

    

natocto / football-data example snippets


class FootballPresenter extends Nette\Application\UI\Presenter
{
	/**
	 * @inject
	 * @var \NatocTo\FootballData\FootballData
	 */
	public $footballData;

	public function renderDefault()
	{
		$euro2016 = $this->footballData->getSeason(424);

		$this->template->name = $euro2016->getName();

		$this->template->fixtures = $euro2016->getFixtures();
	}
}