forked from pkp/pkp-lib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pkp#9678 WIP: Replacing task schedular with laravel schedular
- Loading branch information
1 parent
667b73d
commit 4a92d72
Showing
9 changed files
with
287 additions
and
203 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
namespace PKP\core; | ||
|
||
use Illuminate\Console\OutputStyle; | ||
use Illuminate\Console\View\Components\Factory; | ||
use Illuminate\Support\ServiceProvider; | ||
use Symfony\Component\Console\Input\ArgvInput; | ||
use Symfony\Component\Console\Output\ConsoleOutput; | ||
|
||
class PKPConsoleCommandServiceProvider extends ServiceProvider | ||
{ | ||
public function register() | ||
{ | ||
$this->app->bind(Factory::class, function ($app) { | ||
return new Factory( | ||
self::getConsoleOutputStyle() | ||
); | ||
}); | ||
} | ||
|
||
public static function getConsoleOutputStyle(): OutputStyle | ||
{ | ||
return new OutputStyle( | ||
...self::getConsoleIOInstances() | ||
); | ||
} | ||
|
||
public static function getConsoleIOInstances(): array | ||
{ | ||
return [ | ||
new ArgvInput([]), | ||
new ConsoleOutput(), | ||
]; | ||
} | ||
} |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
namespace PKP\plugins\interfaces; | ||
|
||
use APP\scheduler\Scheduler; | ||
|
||
interface HasTaskScheduler | ||
{ | ||
public function registerSchedules(?Scheduler $scheduler = null): void; | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.