2017 © Pedro Peláez
 

project creator

image

gnkw/creator

  • Saturday, January 11, 2014
  • by Gnuk
  • Repository
  • 2 Watchers
  • 5 Stars
  • 42 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

GNKW Creator

Introduction

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., (*1)

To use this Creator you need to have read and write rights to create files by PHP., (*2)

Install it with composer

To install composer :, (*3)

$ curl -sS https://getcomposer.org/installer | php

To install the latest version of the creator :, (*4)

Stable :, (*5)

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

Dev :, (*6)

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

Go to your creator, (*7)

$ 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., (*8)

Please transform your classes with the standard notation : MyClass.php before updating the creator., (*9)

Create a class

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

$ 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 :, (*11)

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

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

Use a class

Copy the index.php example file to your web directory, (*13)

$ 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 :, (*14)

$ vim web/index.php

~~~~~~~~~~~~~{.php} /** * Your Main Code */ use \Name\Space\MyClass; $myClass = new MyClass(); ~~~~~~~~~~~~~, (*15)

Then, when executing web/index.php, it returns :, (*16)

$ php web/index.php
Hello MyClass !

The Versions

11/01 2014

2.0.x-dev

2.0.9999999.9999999-dev http://www.gnkw.org

  Sources   Download

AGPL-3.0

The Requires

 

web kernel network creator gnkw gnuk

11/01 2014

dev-master

9999999-dev http://www.gnkw.org

  Sources   Download

AGPL-3.0

The Requires

 

web kernel network creator gnkw gnuk

11/01 2014

v2.0.1

2.0.1.0 http://www.gnkw.org

  Sources   Download

AGPL-3.0

The Requires

 

web kernel network creator gnkw gnuk

07/09 2013

v2.0

2.0.0.0 http://www.gnkw.org

  Sources   Download

AGPL-3.0

The Requires

 

web kernel network creator gnkw gnuk

06/09 2013

1.2.x-dev

1.2.9999999.9999999-dev http://www.gnkw.org

  Sources   Download

AGPL-3.0

The Requires

  • php >=5.3.3

 

web kernel network creator gnkw gnuk

06/09 2013

v1.2.0

1.2.0.0 http://www.gnkw.org

  Sources   Download

AGPL-3.0

The Requires

  • php >=5.3.3

 

web kernel network creator gnkw gnuk

02/09 2013

v1.1

1.1.0.0 http://www.gnkw.org

  Sources   Download

AGPL-3.0

web kernel network creator gnkw gnuk