-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[VarDumper] show proxified class on hover
- Loading branch information
1 parent
83232f8
commit 955494c
Showing
2 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
src/Symfony/Component/VarDumper/Caster/ProxyManagerCaster.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?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 Symfony\Component\VarDumper\Caster; | ||
|
||
use ProxyManager\Proxy\ProxyInterface; | ||
use Symfony\Component\VarDumper\Cloner\Stub; | ||
|
||
/** | ||
* @author Nicolas Grekas <p@tchwork.com> | ||
*/ | ||
class ProxyManagerCaster | ||
{ | ||
public static function castProxy(ProxyInterface $c, array $a, Stub $stub, $isNested) | ||
{ | ||
if ($parent = \get_parent_class($c)) { | ||
$stub->class .= ' - '.$parent; | ||
} | ||
$stub->class .= '@proxy'; | ||
|
||
return $a; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters