ExamGecko
Question list
Search
Search

Question 17 - AD0-E717 discussion

Report
Export

A developer is creating a class \Vendor\Module\Model\MyModeL How should that class be defined as transient in di.xml?

A.
<type name='\Vendor\Module\Model\MyModer transient='true7>
Answers
A.
<type name='\Vendor\Module\Model\MyModer transient='true7>
B.
<type name='\Vendor\Module\Model\MyModer singleton='false7>
Answers
B.
<type name='\Vendor\Module\Model\MyModer singleton='false7>
C.
<type name='\Vendor\Module\Model\MyModer shared='false7>
Answers
C.
<type name='\Vendor\Module\Model\MyModer shared='false7>
Suggested answer: A

Explanation:

To define a class as transient in di.xml, the transient attribute should be set to true.

Code snippet

<type name='\Vendor\Module\Model\MyModel' transient='true'>

asked 02/10/2024
Péter Szittya
43 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first