Zend
200-550 · Question #14
You'd like to use the class MyDBConnection that's defined in the MyGreatFramework\MyGreatDatabaseAbstractionLayer namespace, but you want to minimize as much as possible the length of the class name…
The correct answer is C. Alias MyGreatFramework\MyGreatDatabaseAbstractionLayer\MyDBConnection to a shorter. See the full explanation below for the reasoning.
Question
You'd like to use the class MyDBConnection that's defined in the MyGreatFramework\MyGreatDatabaseAbstractionLayer namespace, but you want to minimize as much as possible the length of the class name you have to type. What would you do?
Options
- AImport the MyGreatFramework namespace
- BImport the MyGreatFramework\MyGreatDatabaseAbstractionLayer namespace
- CAlias MyGreatFramework\MyGreatDatabaseAbstractionLayer\MyDBConnection to a shorter
- DAlias MyGreatFramework\MyGreatDatabaseAbstractionLayer to a shorter name
How the community answered
(18 responses)- A17% (3)
- B6% (1)
- C78% (14)
Community Discussion
No community discussion yet for this question.