Skip to content

Commit

Permalink
Adapted readme, updated composer.json, and removed old (obsolete) exa…
Browse files Browse the repository at this point in the history
…mple file.
  • Loading branch information
muratpurc committed Jan 29, 2023
1 parent 45abbbe commit e764ab7
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 84 deletions.
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "purc/autoloader-class-map",
"type": "library",
"description": "Autoloader class map generator",
"description": "Autoloader class map generator and autoloader for usage in composer or PHP projects",
"keywords": [
"php",
"autoload",
Expand All @@ -16,6 +16,9 @@
"homepage": "https://www.purc.de"
}
],
"require": {
"php": ">=7.0"
},
"license": ["GPL-2.0-or-later"],
"autoload": {
"psr-4": {
Expand Down
81 changes: 0 additions & 81 deletions example.php

This file was deleted.

23 changes: 21 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# AutoloaderClassMap

Is able to parse several defined directories/files for existing `class`/`interface`/`trait` and to generate a
class map configuration file which is usable for an autoloader implementation.
A PHP based class map generator and autoloader for usage with [composer](https://getcomposer.org/) or in PHP projects.

Is able to parse several defined directories/files for existing `class`/`interface`/`trait` and
to generate a class map configuration file which is usable for an autoloader implementation.

---

Expand Down Expand Up @@ -134,6 +136,23 @@ $GLOBALS['PURC_AUTOLOADER_CLASS_MAP_FILE'] = '/path/to/your/class_map_file.php';

## Usage

The AutoloaderClassMap `examples` will be within the `vendor` folder (`vendor/purc/autoloader-class-map/examples`)
in case you have installed the package via composer.

You should copy the `examples` folder to you project root, by typing following command in you command line tool:

```sh
cp -r ./vendor/purc/autoloader-class-map/examples ./examples
```

This step ist not mandatory, but most likely you need to do some adaptions in the example files,
e.g. configuring the class map creation to your needs, and it is not recommended to modify files
within the `vendor` folder. You can also use the logic in [class_map_generation.php](./examples/class_map_generation.php)
as a blueprint and implement your own class map creation script.

The description below will assume, that the `examples` folder is in your project root, and you are using
the example files being delivered with the AutoloaderClassMap package.

### Create a class map configuration

See [class_map_generation.php](./examples/class_map_generation.php) in [examples](./examples) folder.
Expand Down

0 comments on commit e764ab7

Please sign in to comment.