2017 © Pedro Peláez
 

library prototype

PHP 5.4 - Prototype

image

breux/prototype

PHP 5.4 - Prototype

  • Monday, January 27, 2014
  • by JulienBreux
  • Repository
  • 1 Watchers
  • 1 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

PHP 5.4 - Prototype

Build Status Scrutinizer Quality Score Code Coverage, (*1)

Play with prototype in PHP 5.4!, (*2)

Example

Class

``` php class Foo { use Prototype\Prototype; }, (*3)


### Add prototype to object (and others objects) ``` php $foo = new Foo; $foo->saidHello = function($lastName) { return "Hello $lastName"; }; echo $foo->saidHello('Julien');

Add prototype to class (for all objects)

Foo::prototype('saidHello', function($lastName)
{
  return "Hello $lastName";
});

Usage

$bar = new Foo;

echo $bar->saidHello('Laura');

The Versions

27/01 2014

dev-master

9999999-dev

PHP 5.4 - Prototype

  Sources   Download

MIT

The Requires

  • php >=5.4.1

 

The Development Requires

by Julien Breux

06/01 2013

1.0

1.0.0.0

PHP 5.4 - Prototype

  Sources   Download

MIT

The Requires

  • php >=5.4.1

 

by Julien Breux