I use get_class_methods to get classes for Drupal classes, for example I go to devel/php and run:

$coupon = \Drupal::entityTypeManager()


But If I want to get list of classes for some vendor library I don't know how to get them.

1 Answer 1


That's off-topic. But try this:

$ composer require ramsey/uuid

And then put the whole use statement without use into get_class_methods():


Putting that into a new ReflectionClass() would actually give you much more useful output:

$class = new ReflectionClass('Ramsey\Uuid\Uuid');
$methods = $class->getMethods(ReflectionMethod::IS_PUBLIC);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.