Skip to content

Three-legged-white-crow/phpCodeGenerator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

phpCodeGenerator

install

composer require three-legged-white-crow/php-code-generator dev-main

how to use

input:

        $class = new ClassT('Test', 'Father');
        $class->addUse('Test/add');
        $class->addTrait('Singleton');
        $class->addPublicProperty('goods');
        $class->addProtectProperty('pp');
        $class->addClassComment('@property string $goodsName');
        $class->addClassComment('@property string $goodsName');
        $class->addPublicMethod('HelloWorld', '', "echo 'hello world';");
        echo $class;

output:

use Test/add;

/**
 * @property string $goodsName
 * @property string $goodsName
 */
class Test extends Father
{
    use Singleton;

    public $goods;

    protected $pp;

    public function HelloWorld()
    {
        echo 'hello world';
    }
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages