Skip to content

lingtalfi/ReflectionRepresentation

Repository files navigation

ReflectionRepresentation

2015-10-27 -> 2021-03-05

Class to help with representation of \Reflection elements.

ReflectionRepresentation is part of the universe framework.

Install

Using the planet installer via light-cli

lt install Ling.ReflectionRepresentation

Using the uni command.

uni import Ling/ReflectionRepresentation

How to use

ReflectionRepresentation is a planet.

Getting a string representation for a \Reflection parameter

<?php


use Ling\ReflectionRepresentation\ReflectionParameterUtil;


require_once "bigbang.php";


class ABC
{

    public function getDynamicBoost($doing, ABC $parent, array $mood = ['oo' => 'pp'], &$please = true)
    {
        if (true === $please) {
            echo "please";
        }
    }

}

$o = new ABC();
$method = new \ReflectionMethod($o, 'getDynamicBoost');
$parameters = $method->getParameters();
foreach ($parameters as $parameter) {
    $s = ReflectionParameterUtil::create()->getParameterAsString($parameter);
    echo $s . '<br>';
}

Dependencies

History Log

  • 1.0.4 -- 2021-05-31

    • Removing trailing plus in lpi-deps file (to work with Light_PlanetInstaller:2.0.0 api
  • 1.0.3 -- 2021-03-05

    • update README.md, add install alternative
  • 1.0.2 -- 2020-12-08

    • Fix lpi-deps not using natsort.
  • 1.0.1 -- 2020-12-04

    • Add lpi-deps.byml file
  • 1.0.0 -- 2015-10-27

    • initial commit

About

Class to help with representation of \Reflection elements.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages