technodelight/php-cli-editor-input

Small and simple intermediate layer between console editors (like vim) and your PHP console application

Installs: 685

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/technodelight/php-cli-editor-input

1.0 2019-07-03 11:58 UTC

This package is auto-updated.

Last update: 2025-09-29 02:49:37 UTC


README

Small and simple intermediate layer between console editors (like vim) and your PHP console application

Usage

use Technodelight\CliEditorInput\AdaptableFactoryWithPreference;

$editor = AdaptableFactoryWithPreference::build('vim');
$title = 'Title will be a commented out section as first line in the editor';
$content = 'Initial content, which can be edited';
$content = $editor->edit($title, $content, $stripComments = true);
// $content will contain all lines read back from the editor, excluding commented out lines
// each line starting with # is considered as comment (regex '/^#/')