Вход Регистрация
Файл: symfony-2.7/src/Symfony/Component/VarDumper/Caster/ReflectionCaster.php
Строк: 38
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace SymfonyComponentVarDumperCaster;

use 
SymfonyComponentVarDumperClonerStub;

/**
 * Casts Reflector related classes to array representation.
 *
 * @author Nicolas Grekas <p@tchwork.com>
 */
class ReflectionCaster
{
    public static function 
castReflector(Reflector $c, array $aStub $stub$isNested)
    {
        
$a["~reflection"] = $c->__toString();

        return 
$a;
    }

    public static function 
castClosure(Closure $c, array $aStub $stub$isNested)
    {
        
$stub->class 'Closure'// HHVM generates unique class names for closures
        
$a = static::castReflector(new ReflectionFunction($c), $a$stub$isNested);
        unset(
$a["+000"], $a['name'], $a["+this"], $a["+parameter"]);

        return 
$a;
    }
}
Онлайн: 1
Реклама