seiler / directive
This package is abandoned and no longer maintained.
No replacement package was suggested.
A PHP library to manipulate nginx configurations
v1.0.2
2020-12-20 17:10 UTC
Requires
- php: ^7.3|^8.0
- illuminate/collections: ^8.0
This package is auto-updated.
Last update: 2022-09-20 21:12:37 UTC
README
Directive helps you to manipulate Nginx configurations in PHP with ease.
Requirements
PHP 7.3 > 8.0
Installation
$ composer require seiler/directive
<?php use Seiler\Directive;
Usage
- Load a Nginx configuration:
$config = file_get_contents('/path/to/nginx/config/file.conf'); $directive = Directive::fromString($config);
- Add your changes:
$directive->server->serverName->value('example.org');
- Save your changes:
file_put_contents('/path/to/nginx/config/file.conf', $directive);
License
The MIT License (MIT). Please see License File for more information.