What is the component, helper and why are they used, is there other way we can do same thing, what is better?
Answer Posted / Nakul Kumar
Component: It is a reusable PHP class that extends CComponent. Helper is a convenience function provided by Yii to perform specific tasks. They are used to reduce the repetitive code and enhance productivity. For the same functionality, you can use plain PHP classes or functions. However, using built-in components and helpers provided by Yii offers better performance, consistency, and less boilerplate code.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers