A PHP CLI script that splits a file containing multiple PHP classes up into multiple files with one class per file.
Switch branches/tags
Nothing to show
Clone or download
elazar Merge pull request #1 from rfojta/master
Added parsing string for "{$variable}" cases
Latest commit acb2ad2 Sep 8, 2018
Permalink
Failed to load latest commit information.
README.md
php-class-splitter.php

README.md

Usage

php php-class-splitter.php FILE DEST

Splits a file containing multiple PHP classes up into multiple files with one class per file. Overwrites any existing files in the destination path with the same name, useful for handling redundant class definitions across multiple files. Requires the tokenizer extension.

  • FILE - path to a single PHP file containing multiple class definitions
  • DEST - path to a directory to contain the new class files

License

MIT License