2017 © Pedro Peláez
 

library traitor

Compose new classes using interfaces and traits at runtime.

image

icecave/traitor

Compose new classes using interfaces and traits at runtime.

  • Wednesday, October 8, 2014
  • by jmalloc
  • Repository
  • 2 Watchers
  • 3 Stars
  • 11 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Traitor

![Build Status] ![Test Coverage] ![SemVer], (*1)

Traitor is a PHP library for dynamically generating classes that implement certain interfaces by use of traits. The primary purpose is for creating test mocks., (*2)

Example

The example below creates an instance of an object that implements the SomeInterface interface by using the SomeTrait trait. It is passed the values 1, 2, and 3 as constructor parameters., (*3)

use Icecave\Traitor\Traitor;

$instance = Traitor::create()
    ->implements_(SomeInterface::CLASS)
    ->use_(SomeTrait::CLASS)
    ->instance(1, 2, 3);

The Versions

08/10 2014

dev-develop

dev-develop https://github.com/IcecaveStudios/traitor

Compose new classes using interfaces and traits at runtime.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

mock testing trait code generate interface mocking

09/09 2014

dev-master

9999999-dev https://github.com/IcecaveStudios/traitor

Compose new classes using interfaces and traits at runtime.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

mock testing trait code generate interface mocking

09/09 2014

1.0.0

1.0.0.0 https://github.com/IcecaveStudios/traitor

Compose new classes using interfaces and traits at runtime.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

mock testing trait code generate interface mocking

03/09 2014

0.1.0

0.1.0.0 https://github.com/IcecaveStudios/traitor

Compose new classes using interfaces and traits at runtime.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

mock testing trait code generate interface mocking