dking3876/php-to-typescript
Composer 安装命令:
composer require dking3876/php-to-typescript
包简介
Convert your PHP classes to Typescript
README 文档
README
This package will convert your php classes into abstract class in typescript. All classes will be appended by an underscore(_) and should be extended in a concrete class.
Author
Deryk William King dking3876@msn.com
Requirements
- Php 7.x
- Composer
Installation
Install the PhpToTypescript package composer require dking3876/PhpToTypescript
Instructions
This package will convert a folder of models and create typescript file structure matching the source with abstract classes for each one. You will need to modify the files with any appropriate import statements (import {User} from './User' ).
Create a php script with the following code.
<?php include 'vendor/autoload.php'; use PhpToTypescript\Converter; $pathToYourModelFolder = ''; $convert = Converter::convert($pathToYourModelFolder);
Run your new script and a 'convert' folder will be created in the folder your run the script from with the models folder and all the created ts files.
统计信息
- 总下载量: 745
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-08-30