We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
self::class
parent::class
static::class
Example:
<?php declare(strict_types=1); use Roave\BetterReflection\BetterReflection; use Roave\BetterReflection\Reflector\ClassReflector; use Roave\BetterReflection\SourceLocator\Type\StringSourceLocator; require_once __DIR__ . '/vendor/autoload.php'; $foo = (new ClassReflector( new StringSourceLocator( <<<'PHP' <?php class Baz { } class Foo extends Baz { public $bar = self::class; public $baz = static::class; public $taz = parent::class; } PHP , (new BetterReflection())->astLocator() ) ))->reflect('Foo'); var_dump($foo->getDefaultProperties());
The output will be something like:
array(3) { 'bar' => string(4) "self" 'baz' => string(6) "static" 'taz' => string(6) "parent" }
The expected output should be:
array(3) { 'bar' => string(4) "Foo" 'baz' => string(6) "Foo" 'taz' => string(6) "Baz" }
The text was updated successfully, but these errors were encountered:
Ocramius
Successfully merging a pull request may close this issue.
Example:
The output will be something like:
The expected output should be:
The text was updated successfully, but these errors were encountered: