Skip to content

pfaciana/parse-php-to-json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Parse PHP to JSON

Convert PHP files into JSON file representations. Namespaces are structured as directories. To be used for building other applications that need to quickly and easily parse PHP source code.

See Projects that use parse-php-to-json

  • Parse PHP to Markdown - used for building GitHub project wikis (written in Node)
  • Render Docs - web server that dynamically displays documentation for PHP srouce code (written in PHP)

Example Use

const parser = require('parse-php-to-json');

console.time();
parser({
    include: ['/some/path/to/src', '.php'],
    exclude: ['vendor',],
    dest: __dirname + '/json',
    encoding: 'utf-8',
    meta: {
        name: "Some Project",
        description: "Some long description..."
    },
}, function (toc, search) {
    // Callback when completed
    console.log(toc); // contents of the Table of Contents file
    console.log(search); // contents of the Search file
    console.log('Done!');
    console.timeEnd();
});

About

Convert PHP files into JSON file representations. Namespaces are structured as directories.

Resources

License

Stars

Watchers

Forks

Packages

No packages published