Page MenuHomeDevCentral

TasksMap.php
No OneTemporary

TasksMap.php

<?php
namespace Nasqueron\SAAS\PhpBB\Runner;
use InvalidArgumentException;
use Nasqueron\SAAS\PhpBB\Tasks\BootstrapSqliteRepository;
use Nasqueron\SAAS\PhpBB\Tasks\CreateDatabase;
class TasksMap {
public static function getMap () : array {
return [
'sites:createdb' => CreateDatabase::class,
'sites:bootstrap' => BootstrapSqliteRepository::class,
];
}
public static function getTaskClassName (string $command) {
foreach (self::getMap() as $taskCommand => $taskClassName) {
if ($command === $taskCommand) {
return $taskClassName;
}
}
throw new InvalidArgumentException;
}
}

File Metadata

Mime Type
text/x-php
Expires
Thu, Dec 26, 16:12 (7 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2315128
Default Alt Text
TasksMap.php (701 B)

Event Timeline