php-class-to-object
v1.0.0
Published
Parse a PHP class into a JavaScript object
Downloads
6
Maintainers
Readme
php-class-to-object
Parse a PHP class into a JavaScript object
Installation
npm install php-class-to-object --save
Usage
const parse = require('php-class-to-object');
const phpClass = fs.readFileSync('./User.php', 'utf-8');
parse(phpClass);
//=> {
//=> properties: {
//=> private: [],
//=> protected: [],
//=> public: [],
//=> },
//=> methods: {
//=> private: [],
//=> protected: [],
//=> public: [
//=> '__construct',
//=> 'create',
//=> 'save',
//= ],
//=> },
//=> }
License
MIT © Daniel Eckermann