PluginProbe ʕ •ᴥ•ʔ
Independent Analytics – WordPress Analytics Plugin / 1.28.2
Independent Analytics – WordPress Analytics Plugin v1.28.2
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 3 years ago Concerns 3 years ago Connectors 3 years ago Console 3 years ago DBAL 3 years ago Eloquent 3 years ago Events 3 years ago Migrations 3 years ago PDO 3 years ago Query 3 years ago Schema 3 years ago ClassMorphViolationException.php 3 years ago ConfigurationUrlParser.php 3 years ago Connection.php 3 years ago ConnectionInterface.php 3 years ago ConnectionResolver.php 3 years ago ConnectionResolverInterface.php 3 years ago DatabaseManager.php 3 years ago DatabaseServiceProvider.php 3 years ago DatabaseTransactionRecord.php 3 years ago DatabaseTransactionsManager.php 3 years ago DetectsConcurrencyErrors.php 3 years ago DetectsLostConnections.php 3 years ago Grammar.php 3 years ago LazyLoadingViolationException.php 3 years ago MigrationServiceProvider.php 3 years ago MultipleRecordsFoundException.php 3 years ago MySqlConnection.php 3 years ago PostgresConnection.php 3 years ago QueryException.php 3 years ago RecordsNotFoundException.php 3 years ago SQLiteConnection.php 3 years ago Seeder.php 3 years ago SqlServerConnection.php 3 years ago
MigrationServiceProvider.php
193 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 class MigrationServiceProvider extends ServiceProvider implements DeferrableProvider
20 {
21 /**
22 * The commands to be registered.
23 *
24 * @var array
25 */
26 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'];
27 /**
28 * Register the service provider.
29 *
30 * @return void
31 */
32 public function register()
33 {
34 $this->registerRepository();
35 $this->registerMigrator();
36 $this->registerCreator();
37 $this->registerCommands($this->commands);
38 }
39 /**
40 * Register the migration repository service.
41 *
42 * @return void
43 */
44 protected function registerRepository()
45 {
46 $this->app->singleton('migration.repository', function ($app) {
47 $table = $app['config']['database.migrations'];
48 return new DatabaseMigrationRepository($app['db'], $table);
49 });
50 }
51 /**
52 * Register the migrator service.
53 *
54 * @return void
55 */
56 protected function registerMigrator()
57 {
58 // The migrator is responsible for actually running and rollback the migration
59 // files in the application. We'll pass in our database connection resolver
60 // so the migrator can resolve any of these connections when it needs to.
61 $this->app->singleton('migrator', function ($app) {
62 $repository = $app['migration.repository'];
63 return new Migrator($repository, $app['db'], $app['files'], $app['events']);
64 });
65 }
66 /**
67 * Register the migration creator.
68 *
69 * @return void
70 */
71 protected function registerCreator()
72 {
73 $this->app->singleton('migration.creator', function ($app) {
74 return new MigrationCreator($app['files'], $app->basePath('stubs'));
75 });
76 }
77 /**
78 * Register the given commands.
79 *
80 * @param array $commands
81 * @return void
82 */
83 protected function registerCommands(array $commands)
84 {
85 foreach (\array_keys($commands) as $command) {
86 $this->{"register{$command}Command"}();
87 }
88 $this->commands(\array_values($commands));
89 }
90 /**
91 * Register the command.
92 *
93 * @return void
94 */
95 protected function registerMigrateCommand()
96 {
97 $this->app->singleton('command.migrate', function ($app) {
98 return new MigrateCommand($app['migrator'], $app[Dispatcher::class]);
99 });
100 }
101 /**
102 * Register the command.
103 *
104 * @return void
105 */
106 protected function registerMigrateFreshCommand()
107 {
108 $this->app->singleton('command.migrate.fresh', function () {
109 return new FreshCommand();
110 });
111 }
112 /**
113 * Register the command.
114 *
115 * @return void
116 */
117 protected function registerMigrateInstallCommand()
118 {
119 $this->app->singleton('command.migrate.install', function ($app) {
120 return new InstallCommand($app['migration.repository']);
121 });
122 }
123 /**
124 * Register the command.
125 *
126 * @return void
127 */
128 protected function registerMigrateMakeCommand()
129 {
130 $this->app->singleton('command.migrate.make', function ($app) {
131 // Once we have the migration creator registered, we will create the command
132 // and inject the creator. The creator is responsible for the actual file
133 // creation of the migrations, and may be extended by these developers.
134 $creator = $app['migration.creator'];
135 $composer = $app['composer'];
136 return new MigrateMakeCommand($creator, $composer);
137 });
138 }
139 /**
140 * Register the command.
141 *
142 * @return void
143 */
144 protected function registerMigrateRefreshCommand()
145 {
146 $this->app->singleton('command.migrate.refresh', function () {
147 return new RefreshCommand();
148 });
149 }
150 /**
151 * Register the command.
152 *
153 * @return void
154 */
155 protected function registerMigrateResetCommand()
156 {
157 $this->app->singleton('command.migrate.reset', function ($app) {
158 return new ResetCommand($app['migrator']);
159 });
160 }
161 /**
162 * Register the command.
163 *
164 * @return void
165 */
166 protected function registerMigrateRollbackCommand()
167 {
168 $this->app->singleton('command.migrate.rollback', function ($app) {
169 return new RollbackCommand($app['migrator']);
170 });
171 }
172 /**
173 * Register the command.
174 *
175 * @return void
176 */
177 protected function registerMigrateStatusCommand()
178 {
179 $this->app->singleton('command.migrate.status', function ($app) {
180 return new StatusCommand($app['migrator']);
181 });
182 }
183 /**
184 * Get the services provided by the provider.
185 *
186 * @return array
187 */
188 public function provides()
189 {
190 return \array_merge(['migrator', 'migration.repository', 'migration.creator'], \array_values($this->commands));
191 }
192 }
193