Yii extension Component Authoring Method instance analysis, Yii extension component
This paper describes how to write yii extension components. Share to everyone for your reference. Specific as follows:
Because Yii itself introduced Prado's component-based thought as the main idea. As a result, components are important in yii.
Components are typically placed in the component directory, with an example of the following basic format:
Components */class Utilities extends ccontroller{public static function Testtool ($param) { // Codes }}
Examples of using method formats:
<?phpecho Utilities::testtool ($param);? >
The reason for implementation is also simple, because all extensions inherit the base class of the system, so when using the method in the application, Yii imports the method to register the class.
It is hoped that this article is helpful to the PHP program design based on YII framework.
http://www.bkjia.com/PHPjc/1024129.html www.bkjia.com true http://www.bkjia.com/PHPjc/1024129.html techarticle Yii extension Component Writing method instance analysis, Yii extension Component This article describes the Yii extension component writing method. Share to everyone for your reference. This is as follows: Because Yii itself introduces ...