2017 © Pedro Peláez
 

library reflection

Library to build objects and extract data out of them

image

innmind/reflection

Library to build objects and extract data out of them

  • Thursday, May 24, 2018
  • by Baptouuuu
  • Repository
  • 1 Watchers
  • 0 Stars
  • 556 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 12 Versions
  • 21 % Grown

The README.md

Reflection

Build Status codecov Type Coverage, (*1)

Library to build objects and extract data out of them., (*2)

Build and inject data into an object

use Innmind\Reflection\Instanciate;
use Innmind\Immutable\{
    Map,
    Maybe,
};

final class Foo
{
    private int $foo;
    private mixed $bar;

    public function __construct(string $foo)
    {
        $this->foo = $foo;
    }
}

$object = (new Instanciate)(Foo::class, Map::of(
    ['foo', 42],
    ['bar', 'baz'],
)); // Maybe<Foo>

This code will create a new Foo object and assign the property foo to 42 and bar to 'baz'., (*3)

Extracting data out of an object

use Innmind\Reflection\Extract;
use Innmind\Immutable\{
    Set,
    Maybe,
    Map,
};

$properties = (new Extract)($myObject, Set::of('foo', 'bar', 'baz')); // Maybe<Map<non-empty-string, mixed>>

The Versions

24/05 2018

dev-develop

dev-develop http://github.com/Innmind/Reflection

Library to build objects and extract data out of them

  Sources   Download

MIT

The Requires

 

The Development Requires

reflection

19/02 2017

dev-master

9999999-dev http://github.com/Innmind/Reflection

Library to build objects and extract data out of them

  Sources   Download

MIT

The Requires

 

The Development Requires

reflection

19/02 2017

2.0.0

2.0.0.0 http://github.com/Innmind/Reflection

Library to build objects and extract data out of them

  Sources   Download

MIT

The Requires

 

The Development Requires

reflection

22/01 2017

1.3.4

1.3.4.0 http://github.com/Innmind/Reflection

Library to build objects and extract data out of them

  Sources   Download

MIT

The Requires

 

The Development Requires

reflection

22/01 2017

1.3.3

1.3.3.0 http://github.com/Innmind/Reflection

Library to build objects and extract data out of them

  Sources   Download

MIT

The Requires

 

The Development Requires

reflection

22/01 2017

1.3.2

1.3.2.0 http://github.com/Innmind/Reflection

Library to build objects and extract data out of them

  Sources   Download

MIT

The Requires

 

The Development Requires

reflection

21/01 2017

1.3.1

1.3.1.0 http://github.com/Innmind/Reflection

Library to build objects and extract data out of them

  Sources   Download

MIT

The Requires

 

The Development Requires

reflection

21/01 2017

1.3.0

1.3.0.0 http://github.com/Innmind/Reflection

Library to build objects and extract data out of them

  Sources   Download

MIT

The Requires

 

The Development Requires

reflection

18/01 2017

1.2.0

1.2.0.0 http://github.com/Innmind/Reflection

Library to build objects and extract data out of them

  Sources   Download

MIT

The Requires

 

The Development Requires

reflection

28/02 2016

1.1.1

1.1.1.0 http://github.com/Innmind/Reflection

Library to build objects and extract data out of them

  Sources   Download

MIT

The Requires

 

reflection

04/02 2016

1.1.0

1.1.0.0 http://github.com/Innmind/Reflection

Library to build objects and extract data out of them

  Sources   Download

MIT

The Requires

 

reflection

17/01 2016

1.0.0

1.0.0.0 http://github.com/Innmind/Reflection

Library to build objects and extract data out of them

  Sources   Download

MIT

The Requires

 

reflection