Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

GNKW Creator


This creator is used to generate some PHP Classes in an organized structure. It use an autoloader, so you can easily call the classes you want between them and from a php main script by calling the autoloader. It also let you create PHPUnit test classes to test your php classes.

To use this Creator you need to have read and write rights to create files by PHP.

Install it with composer

To install composer :

$ curl -sS | php

To install the latest version of the creator :

Stable :

$ php composer.phar create-project gnkw/creator gnkw-creator

Dev :

$ php composer.phar create-project gnkw/creator gnkw-creator master

Go to your creator

$ cd gnkw-creator

Update from 1.x to 2.x

This is the version 2.x of the creator, so now, you can't transform your classes and you can't use the old notation class like this : MyClass.class.php.

Please transform your classes with the standard notation : MyClass.php before updating the creator.

Create a class

You can create a class by using this command (replace Name/Space and MyClass by your datas) :

$ php app/console.php create class Name/Space MyClass

Create a test class

To create a test class for a class using PHPUnit, it's a similar syntax :

$ php app/console.php create test Name/Space MyClass

Note : If the original class don't exist, the test class can't be created.

Use a class

Copy the index.php example file to your web directory

$ mkdir web && cp examples/index.php web/.

After that, you want use your classes, so go to the web/index.php file and use or precise the namespace in the Your Main Code section :

$ vim web/index.php
	* Your Main Code
	use \Name\Space\MyClass;
	$myClass = new MyClass();

Then, when executing web/index.php, it returns :

$ php web/index.php
Hello MyClass !


A Java environment Simulator to easily create classes in PHP




You can’t perform that action at this time.