hotfix: Stubs for structured rewrite
This commit is contained in:
parent
2f1628b7d8
commit
0b5ed81b78
|
@ -0,0 +1,9 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace NoccyLabs\Hotfix\Exception;
|
||||||
|
|
||||||
|
use Exception;
|
||||||
|
|
||||||
|
class HotfixException extends Exception
|
||||||
|
{
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace NoccyLabs\Hotfix\Exception;
|
||||||
|
|
||||||
|
class NotCompatibleException extends HotfixException
|
||||||
|
{
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace NoccyLabs\Hotfix\Exception;
|
||||||
|
|
||||||
|
class NotImplementedException extends HotfixException
|
||||||
|
{
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace NoccyLabs\Hotfix\Exception;
|
||||||
|
|
||||||
|
class UnsupportedRunnerException extends HotfixException
|
||||||
|
{
|
||||||
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace NoccyLabs\Hotfix\Runner;
|
||||||
|
|
||||||
|
use NoccyLabs\Hotfix\System\Facts;
|
||||||
|
use NoccyLabs\Hotfix\Hotfix\Hotfix;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Run hotfixes written in BASH/DASH script.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
class BashRunner implements RunnerInterface
|
||||||
|
{
|
||||||
|
|
||||||
|
public function prepare(Hotfix $hotfix, Facts $facts)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public function apply()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace NoccyLabs\Hotfix\Runner;
|
||||||
|
|
||||||
|
use NoccyLabs\Hotfix\System\Facts;
|
||||||
|
use NoccyLabs\Hotfix\Hotfix\Hotfix;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Run hotfixes written in PHP
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
class PhpRunner implements RunnerInterface
|
||||||
|
{
|
||||||
|
|
||||||
|
public function prepare(Hotfix $hotfix, Facts $facts)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public function apply()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,25 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace NoccyLabs\Hotfix\Runner;
|
||||||
|
|
||||||
|
use NoccyLabs\Hotfix\System\Facts;
|
||||||
|
use NoccyLabs\Hotfix\Hotfix\Hotfix;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Run hotfixes written in Python.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
class PythonRunner implements RunnerInterface
|
||||||
|
{
|
||||||
|
|
||||||
|
public function prepare(Hotfix $hotfix, Facts $facts)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException("The Python runner is not implemented");
|
||||||
|
}
|
||||||
|
|
||||||
|
public function apply()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace NoccyLabs\Hotfix\Runner;
|
||||||
|
|
||||||
|
use NoccyLabs\Hotfix\System\Facts;
|
||||||
|
use NoccyLabs\Hotfix\Hotfix\Hotfix;
|
||||||
|
use NoccyLabs\Hotfix\Exception\UnsupportedRunnerException;
|
||||||
|
use NoccyLabs\Hotfix\Exception\NotCompatibleException;
|
||||||
|
|
||||||
|
class RunnerFactory
|
||||||
|
{
|
||||||
|
public static function createRunner(Hotfix $hotfix)
|
||||||
|
{
|
||||||
|
$facts = Facts::getSystemFacts();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace NoccyLabs\Hotfix\Runner;
|
||||||
|
|
||||||
|
use NoccyLabs\Hotfix\System\Facts;
|
||||||
|
use NoccyLabs\Hotfix\Hotfix\Hotfix;
|
||||||
|
|
||||||
|
|
||||||
|
interface RunnerInterface
|
||||||
|
{
|
||||||
|
|
||||||
|
public function applyHotfix(Hotfix $hotfix, Facts $facts);
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue