Do you know what are the methods used in decorator?



Do you know what are the methods used in decorator?..

Answer / Durgesh Kumar Maheshwari

In Zend Framework, decorators are a design pattern that allow for extending or modifying objects without subclassing. Some common methods used with decorators include:nn- `__construct()`: The constructor method is called when an object is instantiated.n- `__invoke()`: This is the main method of a decorator, it's responsible for calling the wrapped object and any additional behavior.n- `__toString()`: Overriding this method allows the decorated object to be casted as a string.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Zend Interview Questions

Tell me what are the ways in which the file can be detected as being uploaded or not?

1 Answers  


How to print a group display individually from its content?

1 Answers  


How we can add custom view helpers to zend framework 2?

1 Answers  


Do you know what are the methods used in decorator?

1 Answers  


What is the way in which the html can be used to form elements?

1 Answers  


Where's the model?

1 Answers  


What is the function lucene?

1 Answers  


How to get all post data?

1 Answers  


How to protect your website from sql injection in zend using select query?

1 Answers  


How to access route, post, get etc. Parameters in zend framework 2?

1 Answers  


Explain the working with form elements in array notation?

1 Answers  


How to write a program that performs the calculations using the sql function?

1 Answers  


Categories