Skip to content

Instantly share code, notes, and snippets.

@cmosguy
Created April 15, 2016 04:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cmosguy/363f0cfef1f904b6ef4823b4f1807207 to your computer and use it in GitHub Desktop.
Save cmosguy/363f0cfef1f904b6ef4823b4f1807207 to your computer and use it in GitHub Desktop.
<?php
namespace SquareKings\Scores;
use SquareKings\Console\Commands\GetScoresCommand;
use SquareKings\Console\Commands\CreateTestGameCommand;
use SquareKings\Game;
use SquareKings\Team;
use SquareKings\Sport;
use SquareKings\League;
use SquareKings\Linescore;
use Illuminate\Support\ServiceProvider;
class ScoresServiceProvider extends ServiceProvider {
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
$app = $this->app;
$this->app->bind("scores.scores", function ($app)
{
return new Scores(new Game(), new Team(), new Sport(), new League(), new Linescore(), $app['log'], $this->app->make('SquareKings\Scores\NBA\ScoresNbaInterface'), $this->app->make('SquareKings\Scores\NFL\ScoresNflInterface')
);
});
$this->app->bind("scores.command.getscores", function ()
{
return new GetScoresCommand(
$this->app->make("scores.scores")
);
});
$this->commands("scores.command.getscores");
$this->app->bind("scores.command.createtestgamecommand", function ()
{
return new CreateTestGameCommand();
});
$this->commands("scores.command.createtestgamecommand");
}
public function provides()
{
return [
"scores.scores",
"scores.command.getscores",
"scores.command.createtestgamecommand"
];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment