PrepAway - Latest Free Exam Questions & Answers

What would you do?

You’d like to use the class MyDBConnection that’s defined in the
MyGreatFrarnework\GreafDatabaseAbstractionLayer namespace, but you want to minimize *as
much as possible* the length of the class name you have to type. What would you do?

PrepAway - Latest Free Exam Questions & Answers

A.
Import the MyGreatFramework namespace

B.
Import the MyGreatFrarnework\GreafDatabaseAbstractionLayer namespace

C.
Alias MyGreatFrarnework\GreafDatabaseAbstractionLayer\MyDBConnection to a shorter name

D.
Alias MyGreatFrarnework\GreafDatabaseAbstractionLayer to a shorter name

Explanation:
This removes the need to prefix the class with the namespace name. You can refer
to the class simply as MyDBConnection.

2 Comments on “What would you do?


Leave a Reply

Your email address will not be published. Required fields are marked *