Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Adobe Exam AD0-E704 Topic 11 Question 52 Discussion

Actual exam question for Adobe's AD0-E704 exam
Question #: 52
Topic #: 11
[All AD0-E704 Questions]

Suppose there are 3 classes: Class A, B and C. Class C have dependecy of Class A You need to overrride/change an argument of class A, create an object of it and inject in Class B in such a way that it should not affect the class C. What should be the magento standard way to do this:

Show Suggested Answer Hide Answer
Suggested Answer: B, C

Contribute your Thoughts:

Tamra
10 hours ago
I agree with Joesph. The Magento standard way is to use di.xml to define the virtual type and then pass the subclass of A into class B.
upvoted 0 times
...
Joesph
11 days ago
Hmm, this seems straightforward. I think A is the correct answer, as it mentions using di.xml to override the argument and create a subclass of A, which can then be injected into class B.
upvoted 0 times
...
Ardella
18 days ago
I'm not sure, but after thinking about it, I also believe option A is the best choice. It follows the standard Magento practices for dependency injection.
upvoted 0 times
...
Erin
23 days ago
I agree with Rossana. Option A seems like the correct approach to override the argument of class A and inject it into class B without affecting class C.
upvoted 0 times
...
Rossana
25 days ago
I think the magento standard way to do this is option A.
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77