Skip to content

Commit

Permalink
Add Phar processing interface
Browse files Browse the repository at this point in the history
  • Loading branch information
Piagrammist committed Oct 3, 2024
1 parent 1fb07f8 commit 31679bc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Processor.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
namespace EasyIni;

use EasyIni\Options\JitOptions;
use EasyIni\Options\PharOptions;
use EasyIni\Options\DisableOptions;
use EasyIni\Options\ExtensionOptions;
use EasyIni\Options\ErrorHandlingOptions;
use EasyIni\Options\ResourceLimitOptions;

use EasyIni\Processors\JitProcessor;
use EasyIni\Processors\PharProcessor;
use EasyIni\Processors\DisableProcessor;
use EasyIni\Processors\ExtensionProcessor;
use EasyIni\Processors\ErrorHandlingProcessor;
Expand All @@ -18,6 +20,7 @@ final class Processor extends Ini
{
private bool $__setup = false;
private ?JitOptions $jit = null;
private ?PharOptions $phar = null;
private ?DisableOptions $disable = null;
private ?ExtensionOptions $extension = null;
private ?ErrorHandlingOptions $errorHandling = null;
Expand Down Expand Up @@ -73,6 +76,7 @@ public function process(?string $inPath = null): string
$ini = $this->readIni($inPath);
$processors = [
JitProcessor::class => $this->jit,
PharProcessor::class => $this->phar,
DisableProcessor::class => $this->disable,
ExtensionProcessor::class => $this->extension,
ErrorHandlingProcessor::class => $this->errorHandling,
Expand All @@ -86,6 +90,11 @@ public function process(?string $inPath = null): string
return $ini;
}

public function setPhar(PharOptions $options): self
{
$this->phar = $options;
return $this;
}
public function setDisable(DisableOptions $options): self
{
$this->disable = $options;
Expand Down

0 comments on commit 31679bc

Please sign in to comment.