<commit_before>Puli - Sane Resource Management for PHP
=======================================

Puli manages the file resources of you PHP project and provides access to these
resources through a unified naming system. Puli manages files in *repositories*,
where you map them to a path:

```php
use Webmozart\Puli\Repository\ResourceRepository;

$repo = new ResourceRepository();
$repo->addResources('/webmozart/puli', '/path/to/resources/assets/*');
$repo->addResource('/webmozart/puli/trans', '/path/to/resources/trans');
```

You can then locate the files using the `getResource()` method:

```php
echo $repo->getResource('/webmozart/puli/css/style.css')->getPath();
// => /path/to/project/resources/assets/css/style.css

echo $repo->getResource('/webmozart/puli/trans/en.xlf')->getPath();
// => /path/to/project/resources/trans/en.xlf
```

Puli allows to dump optimized resource locators. Currently, Puli only provides
one locator implementation that caches the repository paths in PHP files. Pass
the path where these files are stored when you call the `dumpLocator()` method
of the `PhpResourceLocatorDumper`:

```php
use Webmozart\Puli\LocatorDumper\PhpResourceLocatorDumper;

$dumper = new PhpResourceLocatorDumper();
$dumper->dumpLocator($repo, '/path/to/cache');
```

Then create a `PhpResourceLocator` at this location, which lets you locate the
paths of the files in your repository:

```php
use Webmozart\Puli\Locator\PhpResourceLocator;

$locator = new PhpResourceLocator('/path/to/cache');

echo $locator->getResource('/webmozart/puli/css/style.css')->getPath();
// => /path/to/project/resources/assets/css/style.css

echo $locator->getResource('/webmozart/puli/trans/en.xlf')->getPath();
// => /path/to/project/resources/trans/en.xlf
```<commit_msg>Updated the README file<commit_after>Puli - Sane Resource Management for PHP
=======================================

Puli manages the file resources of your PHP project and provides access to these
resources through a unified naming system. Puli manages files in *repositories*,
where you map them to a path:

```php
use Webmozart\Puli\Repository\ResourceRepository;

$repo = new ResourceRepository();
$repo->add('/webmozart/puli', '/path/to/resources/assets/*');
$repo->add('/webmozart/puli/trans', '/path/to/resources/trans');
```

You can then locate the files using the `get()` method:

```php
echo $repo->get('/webmozart/puli/css/style.css')->getPath();
// => /path/to/project/resources/assets/css/style.css

echo $repo->get('/webmozart/puli/trans/en.xlf')->getPath();
// => /path/to/project/resources/trans/en.xlf
```

Puli allows to dump optimized resource locators. Currently, Puli only provides
one locator implementation that caches the repository paths in PHP files. Pass
the path where these files are stored when you call the `dumpLocator()` method
of the `PhpResourceLocatorDumper`:

```php
use Webmozart\Puli\LocatorDumper\PhpResourceLocatorDumper;

$dumper = new PhpResourceLocatorDumper();
$dumper->dumpLocator($repo, '/path/to/cache');
```

Then create a `PhpResourceLocator` at this location, which lets you locate the
paths of the files in your repository:

```php
use Webmozart\Puli\Locator\PhpResourceLocator;

$locator = new PhpResourceLocator('/path/to/cache');

echo $locator->get('/webmozart/puli/css/style.css')->getPath();
// => /path/to/project/resources/assets/css/style.css

echo $locator->get('/webmozart/puli/trans/en.xlf')->getPath();
// => /path/to/project/resources/trans/en.xlf
```
{'fraction_non_alphanumeric': 0.16475315729047071, 'fraction_numerical': 0.0, 'mean_word_length': 5.290613718411552, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6139705', 'n_tokens_mistral': 1112, 'n_tokens_neox': 1091, 'n_words': 289}