2017 © Pedro Peláez
 

library mimic

Dead simple functional library for object prototyping, data hydration and data exposition

image

keyvanakbary/mimic

Dead simple functional library for object prototyping, data hydration and data exposition

  • Sunday, August 9, 2015
  • by keyvanakbary
  • Repository
  • 0 Watchers
  • 12 Stars
  • 1,925 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 4 % Grown

The README.md

Mimic

Build Status, (*1)

Dead simple functional library for object prototyping, data hydration and data exposition., (*2)

Installation

``` bash composer require keyvanakbary/mimic, (*3)


## Usage ```php namespace Domain; use mimic as m; class ComputerScientist { private $name; private $surname; public function __construct($name, $surname) { $this->name = $name; $this->surname = $surname; } public function rocks() { return $this->name . ' ' . $this->surname . ' rocks!'; } } assert(m\prototype('Domain\ComputerScientist') instanceof Domain\ComputerScientist); m\hydrate('Domain\ComputerScientist', array( 'name' => 'John', 'surname' => 'McCarthy' ))->rocks(); //John McCarthy rocks! assert(m\expose(new Domain\ComputerScientist('Grace', 'Hopper')) == array( 'name' => 'Grace', 'surname' => 'Hopper' ));

The Versions

09/08 2015

dev-master

9999999-dev

Dead simple functional library for object prototyping, data hydration and data exposition

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

hydrate serialize unserialize prototype expose imitate mimic replicate

09/08 2015

v1.0.0

1.0.0.0

Dead simple functional library for object prototyping, data hydration and data exposition

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

hydrate serialize unserialize prototype expose imitate mimic replicate