Skip to content
New issue

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

use of object instead of string #3

Open
arcanisgk opened this issue Jul 24, 2021 · 1 comment
Open

use of object instead of string #3

arcanisgk opened this issue Jul 24, 2021 · 1 comment

Comments

@arcanisgk
Copy link

in this example:

use Brick\Reflection\ImportResolver;

$class = new ReflectionClass(App\Test::class);
$resolver = new ImportResolver($class);

echo $resolver->resolve('\Some\FQCN\Class'); // Some\FQCN\Class
echo $resolver->resolve('Something'); // App\Something
echo $resolver->resolve('Something\Else'); // App\Something\Else
echo $resolver->resolve('Bar'); // Foo\Bar
echo $resolver->resolve('Bar\tender'); // Foo\Bar\tender
echo $resolver->resolve('Alias'); // Foo\Bar\Baz
echo $resolver->resolve('Alias\ooka'); // Foo\Bar\Baz\ooka

you are using a string of the declared class: App\Test::clas

Can you extend your class to parse objects in which the instance of a class is stored?

$class = new ReflectionClass($classObject);
@BenMorel
Copy link
Member

BenMorel commented Aug 5, 2021

I'm sorry, I don't understand your question!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants