PluginProbe ʕ •ᴥ•ʔ
Independent Analytics – WordPress Analytics Plugin / 2.2.0
Independent Analytics – WordPress Analytics Plugin v2.2.0
2.15.5 2.15.4 2.15.3 2.15.2 2.15.1 2.15.0 2.14.10 trunk 1.1 1.10 1.10.1 1.11 1.12 1.13 1.14 1.15 1.16 1.17 1.17.1 1.17.2 1.17.3 1.17.4 1.18 1.18.1 1.19.0 1.19.1 1.2 1.20.0 1.21.0 1.22.0 1.22.1 1.23.0 1.23.1 1.24.0 1.24.1 1.25.0 1.25.1 1.26.0 1.27.0 1.28.0 1.28.1 1.28.2 1.28.3 1.29.0 1.3 1.30.0 1.30.1 1.4 1.5 1.6 1.7 1.8 1.9 2.0.0 2.0.1 2.1.4 2.1.5 2.1.6 2.10.0 2.10.1 2.10.2 2.10.3 2.10.4 2.11.0 2.11.1 2.11.10 2.11.2 2.11.3 2.11.4 2.11.5 2.11.6 2.11.7 2.11.8 2.11.9 2.12.0 2.12.1 2.12.2 2.13.1 2.13.2 2.13.5 2.13.6 2.14.0 2.14.1 2.14.2 2.14.4 2.14.6 2.14.7 2.14.8 2.14.9 2.2.0 2.2.1 2.3.1 2.3.2 2.4.2 2.4.3 2.5.0 2.5.1 2.6.0 2.6.1 2.6.2 2.6.3 2.6.4 2.7.0 2.7.1 2.7.2 2.7.3 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.8 2.8.9 2.9.2 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7
independent-analytics / vendor / illuminate / database / MigrationServiceProvider.php
independent-analytics / vendor / illuminate / database Last commit date
Capsule 2 years ago Concerns 2 years ago Connectors 2 years ago Console 2 years ago DBAL 2 years ago Eloquent 2 years ago Events 2 years ago Migrations 2 years ago PDO 2 years ago Query 2 years ago Schema 2 years ago ClassMorphViolationException.php 2 years ago ConfigurationUrlParser.php 2 years ago Connection.php 2 years ago ConnectionInterface.php 2 years ago ConnectionResolver.php 2 years ago ConnectionResolverInterface.php 2 years ago DatabaseManager.php 2 years ago DatabaseServiceProvider.php 2 years ago DatabaseTransactionRecord.php 2 years ago DatabaseTransactionsManager.php 2 years ago DetectsConcurrencyErrors.php 2 years ago DetectsLostConnections.php 2 years ago Grammar.php 2 years ago LazyLoadingViolationException.php 2 years ago MigrationServiceProvider.php 2 years ago MultipleRecordsFoundException.php 2 years ago MySqlConnection.php 2 years ago PostgresConnection.php 2 years ago QueryException.php 2 years ago RecordsNotFoundException.php 2 years ago SQLiteConnection.php 2 years ago Seeder.php 2 years ago SqlServerConnection.php 2 years ago
MigrationServiceProvider.php
194 lines
1 <?php
2
3 namespace IAWP_SCOPED\Illuminate\Database;
4
5 use IAWP_SCOPED\Illuminate\Contracts\Events\Dispatcher;
6 use IAWP_SCOPED\Illuminate\Contracts\Support\DeferrableProvider;
7 use IAWP_SCOPED\Illuminate\Database\Console\Migrations\FreshCommand;
8 use IAWP_SCOPED\Illuminate\Database\Console\Migrations\InstallCommand;
9 use IAWP_SCOPED\Illuminate\Database\Console\Migrations\MigrateCommand;
10 use IAWP_SCOPED\Illuminate\Database\Console\Migrations\MigrateMakeCommand;
11 use IAWP_SCOPED\Illuminate\Database\Console\Migrations\RefreshCommand;
12 use IAWP_SCOPED\Illuminate\Database\Console\Migrations\ResetCommand;
13 use IAWP_SCOPED\Illuminate\Database\Console\Migrations\RollbackCommand;
14 use IAWP_SCOPED\Illuminate\Database\Console\Migrations\StatusCommand;
15 use IAWP_SCOPED\Illuminate\Database\Migrations\DatabaseMigrationRepository;
16 use IAWP_SCOPED\Illuminate\Database\Migrations\MigrationCreator;
17 use IAWP_SCOPED\Illuminate\Database\Migrations\Migrator;
18 use IAWP_SCOPED\Illuminate\Support\ServiceProvider;
19 /** @internal */
20 class MigrationServiceProvider extends ServiceProvider implements DeferrableProvider
21 {
22 /**
23 * The commands to be registered.
24 *
25 * @var array
26 */
27 protected $commands = ['Migrate' => 'command.migrate', 'MigrateFresh' => 'command.migrate.fresh', 'MigrateInstall' => 'command.migrate.install', 'MigrateRefresh' => 'command.migrate.refresh', 'MigrateReset' => 'command.migrate.reset', 'MigrateRollback' => 'command.migrate.rollback', 'MigrateStatus' => 'command.migrate.status', 'MigrateMake' => 'command.migrate.make'];
28 /**
29 * Register the service provider.
30 *
31 * @return void
32 */
33 public function register()
34 {
35 $this->registerRepository();
36 $this->registerMigrator();
37 $this->registerCreator();
38 $this->registerCommands($this->commands);
39 }
40 /**
41 * Register the migration repository service.
42 *
43 * @return void
44 */
45 protected function registerRepository()
46 {
47 $this->app->singleton('migration.repository', function ($app) {
48 $table = $app['config']['database.migrations'];
49 return new DatabaseMigrationRepository($app['db'], $table);
50 });
51 }
52 /**
53 * Register the migrator service.
54 *
55 * @return void
56 */
57 protected function registerMigrator()
58 {
59 // The migrator is responsible for actually running and rollback the migration
60 // files in the application. We'll pass in our database connection resolver
61 // so the migrator can resolve any of these connections when it needs to.
62 $this->app->singleton('migrator', function ($app) {
63 $repository = $app['migration.repository'];
64 return new Migrator($repository, $app['db'], $app['files'], $app['events']);
65 });
66 }
67 /**
68 * Register the migration creator.
69 *
70 * @return void
71 */
72 protected function registerCreator()
73 {
74 $this->app->singleton('migration.creator', function ($app) {
75 return new MigrationCreator($app['files'], $app->basePath('stubs'));
76 });
77 }
78 /**
79 * Register the given commands.
80 *
81 * @param array $commands
82 * @return void
83 */
84 protected function registerCommands(array $commands)
85 {
86 foreach (\array_keys($commands) as $command) {
87 $this->{"register{$command}Command"}();
88 }
89 $this->commands(\array_values($commands));
90 }
91 /**
92 * Register the command.
93 *
94 * @return void
95 */
96 protected function registerMigrateCommand()
97 {
98 $this->app->singleton('command.migrate', function ($app) {
99 return new MigrateCommand($app['migrator'], $app[Dispatcher::class]);
100 });
101 }
102 /**
103 * Register the command.
104 *
105 * @return void
106 */
107 protected function registerMigrateFreshCommand()
108 {
109 $this->app->singleton('command.migrate.fresh', function () {
110 return new FreshCommand();
111 });
112 }
113 /**
114 * Register the command.
115 *
116 * @return void
117 */
118 protected function registerMigrateInstallCommand()
119 {
120 $this->app->singleton('command.migrate.install', function ($app) {
121 return new InstallCommand($app['migration.repository']);
122 });
123 }
124 /**
125 * Register the command.
126 *
127 * @return void
128 */
129 protected function registerMigrateMakeCommand()
130 {
131 $this->app->singleton('command.migrate.make', function ($app) {
132 // Once we have the migration creator registered, we will create the command
133 // and inject the creator. The creator is responsible for the actual file
134 // creation of the migrations, and may be extended by these developers.
135 $creator = $app['migration.creator'];
136 $composer = $app['composer'];
137 return new MigrateMakeCommand($creator, $composer);
138 });
139 }
140 /**
141 * Register the command.
142 *
143 * @return void
144 */
145 protected function registerMigrateRefreshCommand()
146 {
147 $this->app->singleton('command.migrate.refresh', function () {
148 return new RefreshCommand();
149 });
150 }
151 /**
152 * Register the command.
153 *
154 * @return void
155 */
156 protected function registerMigrateResetCommand()
157 {
158 $this->app->singleton('command.migrate.reset', function ($app) {
159 return new ResetCommand($app['migrator']);
160 });
161 }
162 /**
163 * Register the command.
164 *
165 * @return void
166 */
167 protected function registerMigrateRollbackCommand()
168 {
169 $this->app->singleton('command.migrate.rollback', function ($app) {
170 return new RollbackCommand($app['migrator']);
171 });
172 }
173 /**
174 * Register the command.
175 *
176 * @return void
177 */
178 protected function registerMigrateStatusCommand()
179 {
180 $this->app->singleton('command.migrate.status', function ($app) {
181 return new StatusCommand($app['migrator']);
182 });
183 }
184 /**
185 * Get the services provided by the provider.
186 *
187 * @return array
188 */
189 public function provides()
190 {
191 return \array_merge(['migrator', 'migration.repository', 'migration.creator'], \array_values($this->commands));
192 }
193 }
194