Created
April 15, 2016 04:30
-
-
Save cmosguy/363f0cfef1f904b6ef4823b4f1807207 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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