Skip to main content

Create custom params file in yii framework



Yii framework is come with powerful inbuild features eg. 
1. Model-View-Controller (MVC) design pattern 
2. Database Access Objects (DAO) 
3. Custom Query Builder, Active Record (AR) and DB Migration
4. Form input and validation 
5. AJAX-enabled widgets 
6. Authentication and authorization 
7. Layout Skinning and theming 
8. Web services 
9. Internationalization (I18N) and localization (L10N) 
10. Layered caching scheme 
11. Error handling and logging 
12. Security 
13. Unit and functionality testing 
14. Automatic code generation (Gii Module) 
15. Friendly with third-party code
16. Detailed documentation 
17. Extension library etc.

Most of yii beginner write parameter in main.php because thats pattern comes in installed yii framework. This is fine if you have less parameter but if you are building large web portal or application then it's very hard to manage every thing in mail.php because its main config file. So the best way is create seperate params.php in the same directory and include it in you main.php file. Check is below example of params.php and main.php files.
config/main.php :
'params'=>require(dirname(__FILE__).'/params.php'),
config/params.php :
<?php
return array(
 'defaultPageSize'=>10,
 'websiteName'=>'ezeelive.com',
 'copyrightInfo'=>'Copyright &copy; '.date("Y").' Ezeelive Technologies. All Rights Reserved.',
 ...
 ...
);
?>

Comments

  1. As a web development and design service provider Webzin Infotech provides optimum solutions to customer by helping them to achive there goals and make available there services and products in the online market.

    ReplyDelete
  2. Every web design companies and development firms should give the proper responsive to their clients have capability to fulfill the requirement of customers.Then only they would get a chance to improve their business.
    Web Design Company | Website Design Companies

    ReplyDelete
  3. Thanks for sharing such a wonderful post.We also provides the best Web Design & Development services in India.

    ReplyDelete

Post a Comment

Popular posts from this blog

Comparison between Prestashop and CS Cart eCommerce System

We (Ezeelive Technologies) are comparison CS Cart with another famouns eCommerce system called Prestashop. Both Prestashop and CS Cart use their own in-build Php MVC pattern. Our development team have find  Prestashop  has such good features like Frontend and Backend Speed, Product Comparison, URL Rewriting, HTML5 Image Uploader, Taxes, Stores Locator etc. Read more :  http://www.ezeelive.com/blog/comparison-prestashop-cs-cart-ecommerce-system/

CS Cart Development Company In India

There is no shortage of CS cart development companies in India and for a well-functioning cart system, it is significant to hire a good company that specializes in designing websites and e-commerce development services. A well-functioning CS cart system can increase the reach of your business and help your business stand out from the other websites. Here we have listed the importance of hiring a CS-Cart Development Company in India and the features you should look for in a company. Significance Of CS-Cart Development Company  CS cart e-commerce system is a widely used and popular shopping cart for e-commerce websites. Features like open sources, easy and free to utilize make this system a unique one. Among all the other carts of shopping, CS cart is popular for its flexibility and easy installation, as it is written completely in PHP language. Aside from that, even managing this system is rather simple and effortless. Various components of HTML, MySQL, etc., are utilized