idiosyncratic/editorconfig

EditorConfig的PHP实现

0.1.3 2021-06-02 16:24 UTC

This package is auto-updated.

Last update: 2024-08-23 00:15:47 UTC


README

PHP实现EditorConfig

安装

使用Composer安装

composer require idiosyncratic/editorconfig

使用方法

<?php

require_once('vendor/autoload.php');

use Idiosyncratic\EditorConfig\EditorConfig;

$ec = new EditorConfig();

// $config will be an array of the declarations matching for the specified path
$config = $ec->getConfigForPath(__FILE__);

// Print matching configuration rules as string
print $ec->printConfigForPath(__FILE__) . PHP_EOL;