Giter Site home page Giter Site logo

php-document-creator's Introduction

phpDocumentCreator

===============

english document

phpDocumentCreator是一个用于生成PHP扩展文档的类库.因为PHP的扩展是使用C语言编写的,所以我们没办法直接查看扩展函数或扩展类库的用法,只能通过查看C源码来了解。我们通过PHP的反射类库列出某个PHP扩展的常量、函数、类常量、属性和方法,然而有时反射类库不能显示完整的信息,而且这些类库没有注释,所以为了弥补这个缺陷,我们可以通过自定义的数据字典为这些扩展类库添加注释,或者我们通过已有PHP代码为这些扩展类库添加注释

安装

1、 通过从github上clone代码

git clone https://github.com/shixinke/php-document-creator

2、 通过composer安装

  composer require shixinke/php-document-creator

基本用法

create php document 生成PHP文档

usage : php creator.php extensionName create

php creator.php swoole create

创建字典

require_once '../Autoloader.php';
//Redis为扩展的名称
$doc = new \documentCreator\Document('Redis');
$doc->createDict();

cd tests
php docTest.php

其他说明

字典

包含PHP扩展的函数、常量和类常量、属性和方法的说明(主要是类型说明,参数说明和注释)

这里自带了yaf,swoole,redis这三个扩展的字典

备注(PHP源代码)

带有注释的PHP源码,目前这里列举了yaf,swoole,redis等三个扩展的注释文件

输出(最终的PHP文档)

如果想使用已经生成好的文档,请查看phpstrom框架助手

如果有好的注释文件请push给我

Author

author:shixinke([email protected],[email protected])

website:http://www.shixinke.com

php-document-creator's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.